mysql 替换字段里的某段字符串

sql:

update raw_inquiriesset

                        extend =REPLACE(extend,

substring(extend,locate('enquiry_id":',extend),locate('"commission',extend)-locate('enquiry_id":',extend)-1 ) ,

concat('enquiry_id":',(1158602+round(rand()*1000,0))))

where id in (

)

你可能感兴趣的:(mysql 替换字段里的某段字符串)