使用mysql中的replace函数
update `table` set content=replace(content,'要替换的字符','替换后的字符');
如果要替换符合条件的数据后面加where条件
update `附表` set content=replace(content,'要替换的字符','替换后的字符') where id in(select id from `主表` where 条件) 替换附表的内容
使用mysql中的replace函数
update `table` set content=replace(content,'要替换的字符','替换后的字符');
如果要替换符合条件的数据后面加where条件
update `附表` set content=replace(content,'要替换的字符','替换后的字符') where id in(select id from `主表` where 条件) 替换附表的内容
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。