Query and delete duplicate records of the SQL statement 1, find redundant records in the table, duplicate records are based on a single field (ID) to determine the select * from table where Id in (select ID from table group Byid have COUNT (ID) > 1) 2, delete redundant records in the table, repeat records are based on a single field (ID) to judge, leaving only rowid minimum records delete from table WHERE (ID) in (SELECT ID from table Group BY ID has count (ID) > 1) and ROWID not in (SELECT MIN (ROWID) from table GROUP by ID has count (*) > 1);   3. Redundant records in lookup table (multiple fields) select * FROM Table A WHERE (A.ID,A.SEQ) in (Select Id,seq from table group by ID,SEQ have count (*) ; 1) 4, delete redundant duplicate records (multiple fields) in the table, leaving only the ROWID minimum records delete from Table A where (A.ID,A.SEQ) in (Select Id,seq from table GROUP by ID,SEQ Have count (*) > 1) and rowID not in (select min (rowid) from table group by ID,SEQ have Count (*) >1) 5, redundant duplicates in lookup table Record (multiple fields), does not contain ROWID minimum records select * from Table A WHERE (A.ID,A.SEQ) in (Select Id,seq from table group by ID,SEQ have count (*) > 1) and rowID not in (select min (rowid) from table group by ID,SEQ have Count (*) >1)