mysql 替换内容指定字符


使用mysql中的replace函数

update `table` set content=replace(content,'要替换的字符','替换后的字符');

如果要替换符合条件的数据后面加where条件

update `附表` set content=replace(content,'要替换的字符','替换后的字符') where id in(select id from `主表` where 条件) 替换附表的内容