Delete duplicate records from table
                                                 Last update (2008-02-15 16:45:00)
                                                                                                                   Date added (2008-02-15 16:43:34)

Summary
To select all duplicate records from a table and delete them use the queries below:
SELECT * FROM table_with_duplicates WHERE ROWID NOT IN
(SELECT MIN (ROWID) FROM table_with_duplicates 
GROUP BY col1, col2, col3);

DELETE FROM table_with_duplicates WHERE ROWID NOT IN
(SELECT MIN (ROWID) FROM table_with_duplicates  
GROUP BY col1, col2, col3);
Reviews
Filters
Search