SQL:REPLACE替换字符串

语法

REPLACE(str,from_str,to_str)

示例

去除 content 字段中的空格

update `tb_news` set `content` = replace(`content`,' ','') where id = 1;

参考文章

  1. mySQL中replace的用法

猜你喜欢

转载自blog.csdn.net/mouday/article/details/131828731