语法
REPLACE ( original-string, search-string, replace-string )

参数
如果有某个参数为 NULL,此函数返回 NULL。

original-string     被搜索的字符串。可为任意长度。

search-string     要搜索并被 replace-string 替换的字符串。该字符串的长度不应超过 255 个字节。如果 search-string 是空字符串,则按原样返回原始字符串。

replace-string     该字符串用于替换 search-string。可为任意长度。如果 replacement-string 是空字符串,则删除出现的所有 search-string。

例子:
update jobs set job_desc=REPLACE(job_desc,'wgc','abc')Where min_lvl=10
将表jobs 中的job_desc字段中的'wgc'替换为'abc',条件为Where min_lvl=10

相关文章:

  • 2021-05-18
  • 2021-05-26
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-07-28
  • 2021-06-15
猜你喜欢
  • 2021-06-02
  • 2021-09-12
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2021-05-17
相关资源
相似解决方案