mysql技巧:按条件筛选,然后替换
程序员文章站
2022-04-04 15:20:22
1、按条件筛选,然后替换 select * from phome_ecms_tv where playurl like '%关键词%';update phome_ecms_tv set myorder=REPLACE(myorder,'99','444') 2、删除含某关键词的内容 delete f ......
1、按条件筛选,然后替换
select * from phome_ecms_tv where playurl like '%关键词%';
update phome_ecms_tv set myorder=REPLACE(myorder,'99','444')
2、删除含某关键词的内容
delete from phome_ecms_tv where playurl like '%关键词%'
(delete+like执行命令,当'%%'中的关键词为空时,会清空整个数据库)
上一篇: 探险家到非洲冒险
下一篇: Windows之路由route