例子:表名 Paper 。通過字段PaperID查找重復數據。
1 --查詢某表中重復的數據
select * from Paper group by PaperID having count(*)>1;
2--刪除重復行數,只剩不重復的記錄(rowid為sqlite自帶字段)
delete from Paper where Paper.rowid not in (select MAX(Paper.rowid) from Paper group by PaperID);
