1.查询重复记录
select * from 表名
where 重复字段 in (select 重复字段 from 表名 group by 重复字段 having count(重复字段) > 1)
2.删除保留一条重复记录
delete from 表名
where 重复字段 in (select 重复字段 from 表名 group by 重复字段 having count(重复字段) > 1)
and ID not in (select min(ID) from 表名 group by 重复字段 having count(重复字段 )>1)