mysql批量替换字符串
时间 :
2022-11-08,15:13:29
编辑:临沂网站建设
1)批量替换tit中的aa为bb,可以替换局部
update ay_content t set t.title= replace (t.title,'aa','bb')
这个主要是用于采集的时候有时候会采集到一些敏感字符串,通过这个sql语句可以实现批量替换.
2)删除内容表下符合查询条件的数据
DELETE FROM ay_content where exists (select e.id from (select a.id from ay_content a LEFT JOIN ay_content_sort b on a.scode=b.scode LEFT JOIN ay_model d on b.mcode=d.mcode where b.mcode='8') e where ay_content.id = e.id)
转载:欢迎访问临沂网站建站,如果转载本文mysql批量替换字符串,请注明本文转载出处。本文链接地址是:/twjc/402.html