替换数据库表中某个代码段中某个字段的某一段字符串sql

update 表名 set 字段=replace(字段同前面的,需要替换的字符串,被替换的字符串) where 条件

例如:update t_social_lead_learn set format_lead_learn =replace(format_lead_learn,'http://aaa','http://bbb') where id in (20608,118,331,120)

猜你喜欢

转载自www.cnblogs.com/cuteCoderSnow/p/11331758.html