Alternatively in a database table for a code segment of a string of a field sql

update table set field = replace (with the previous field, the string needs to be replaced, the replaced character string) WHERE condition

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

 

Guess you like

Origin www.cnblogs.com/cuteCoderSnow/p/11331758.html