标签:select 重复 group 去除 class and email mail count
-- 笨重方法 delete from tb_person WHERE id NOT IN ( select id from (SELECT min(id) id FROM tb_person GROUP BY email having count(1) > 1) tm) and email in ( select email from ( SELECT email FROM tb_person GROUP BY email having count(1) > 1)tm)
-- 获取最小id,排除id信息进行删除 DELETE from Person Where Id not in ( Select MIN(Id) as Id From Person Group by Email )
标签:select 重复 group 去除 class and email mail count
原文地址:https://www.cnblogs.com/lingduqianli/p/13024051.html