PostgreSQL 中 replace 函数

#查看修改后结果,并不真实修改数据库
select replace(字段名,'被替换内容','需要替换的内容') from 表名 where 字段名 like E'%被替换内容%';
#更改字段中包含某个字符为另一个字符,这里是把'被替换内容'替换为需要替换的内容。
update 表名 set 字段名=replace(字段名,E'被替换内容','需要替换的内容') where 字段名 like E'%被替换内容%';

相关文章:

  • 2021-07-03
  • 2021-12-16
  • 2021-12-17
  • 2021-09-15
  • 2021-05-22
  • 2021-07-04
  • 2021-10-22
  • 2021-05-18
猜你喜欢
  • 2022-12-23
  • 2021-09-27
  • 2021-08-22
  • 2021-11-29
  • 2022-12-23
  • 2021-09-30
  • 2021-10-28
相关资源
相似解决方案