--查询表中重复数据
select * from 表名 t where t.id in (
SELECT id FROM 表名 GROUP BY id HAVING COUNT(主键编号)>1
);
--去除表中重复数据
delete from 表名 a where rowid not in (
select max(b.rowid) from 表名 b where a.主键编号 = b.主键编号
);数据库处理表中重复数据方法,布布扣,bubuko.com
数据库处理表中重复数据方法
原文:http://blog.csdn.net/zou_hailin226/article/details/25783205