查找所有重複標題的記錄:
SELECT * FROM t_info a WHERE ((SELECT COUNT(*) FROM t_info WHERE Title = a.Title) > 1) ORDER BY Title DESC
查找全部重複記錄
Select * From 表 Where 重複字段 In (Select 重複字段 From 表 Group By 重複字段 Having Count(*)>1)
過濾重複記錄(只顯示一條)
Select * From HZT Where ID In (Select Max(ID) From HZT Group By Title)
注:此處顯示ID最大一條記錄
查找表中多餘的重複記錄(多個字段)
select * from vitae a where (a.peopleId,a.seq) in (select peopleId,seq from vitae group by peopleId,seq having count(*) > 1)
查找表中多餘的重複記錄(多個字段),不包含rowid最小的記錄
select * from eva a where (a.taskId,a.proId) in (select taskId,proId from eva group by taskId,proId having count(*) > 1)
and id not in (select min(id) from eva group by taskId,proId having count(*)>1)