navicat中查重并删除

Posted kend

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了navicat中查重并删除相关的知识,希望对你有一定的参考价值。

# 查询所有重复的数据
SELECT * FROM hao123 WHERE ir_url IN
(SELECT ir_url FROM `hao123` GROUP BY ir_url having count(ir_url)>1)



#
把查询出来的重复行删除 DELETE FROM `hao123` WHERE ir_url IN (SELECT ir_url FROM (SELECT ir_url FROM `hao123` GROUP BY ir_url having count(ir_url)>1)a) AND ir_id NOT IN (SELECT * FROM (SELECT min(ir_id) FROM `hao123` GROUP BY ir_url HAVING count(ir_url)>1)b);

 

以上是关于navicat中查重并删除的主要内容,如果未能解决你的问题,请参考以下文章

deepin 删除navicat,重新开始计时

用navicat删除重复数据

navicat破解版安装教程不出激活码

Navicat for MySQL这个软件,如何批量删除数据,求大神指导.

navicat到期解决

sql navicat 等