1、批量修改
UPDATE '表名' SET listdir = CASE aid WHEN 1000 THEN '/labels/2840' WHEN 2851 THEN '/labels/2841' END WHERE aid IN (2850,2851)
2、查询重复
select keyword,count(*) as count from '表名' group by keyword having count>1;
3、删除重复
DELETE FROM '表名' WHERE keyword IN (SELECT keyword FROM (SELECT keyword FROM '表名' GROUP BY keyword HAVING COUNT(keyword)>1) e) AND aid NOT IN (SELECT aid FROM (SELECT MIN(aid) AS aid FROM '表名' GROUP BY keyword HAVING COUNT(keyword)>1) t)
标签: mysql
上面是“mysql语句之批量修改、查询重复、删除重复”的全面内容,想了解更多关于 mysql 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_1470.html
workflows工作流
树枝上一只色彩斑斓的小鸟
一盒用五颜六色的食材烹制的热气腾腾的寿司
一套可爱的动漫生物蓬松贴纸图标
一辆机器人虎狮高端混合动力车ComfyUI工作流
一棵树从鸟笼里长出来的梦幻般场景
一只躲在一堆秋叶里的小刺猬
一只可爱的草莓味冰淇淋卷筒
小丑鱼马林在鱼缸里游来游去ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!