版权声明:欢迎评论和转载,转载请注明来源。 https://blog.csdn.net/zy332719794/article/details/76043309
select * --delete
from 表名
WHERE (字段) IN ( SELECT 字段 FROM 表名 GROUP BY 字段 HAVING COUNT(字段) > 1)
AND ROWID NOT IN (SELECT MIN(ROWID) FROM 表名 GROUP BY 字段 HAVING COUNT(*) > 1);