1、查找表中多余的重复记录(多个字段)select * from vitae awhere (a.peopleId,a.seq) in (select peopleId,seq from vitae group by peopleId,seq having count(*)>1)2、删除表中多余的重复记录(多个字段),只留有rowid最小的记录delete from vitae awhere (a.peopleId,a.seq) in (select peopleId,seq from vitae group by peopleId,seq having count(*) > 1)and rowid not in (select min(rowid) from vitae group by peopleId,seq having count(*)>1)注:学习共勉
有不清楚的都可以问我哈^_^
希望各位IT男和IT女也关注一下我的副业,水果https://shop247384222.taobao.com/?spm=a230r.7195193.1997079397.2.YaXEih 批发价
原文:http://www.cnblogs.com/dbdddtest/p/6634797.html