DELETE FROM table_name WHERE id NOT IN ( SELECT MAX(ID) FROM table_name GROUP BY duplicate_col_1, duplicate_col_2, duplicate_col_3)
CREATE TABLE AS new_table_name AS SELECT DISTINCT * FROM original_table_name;
DROP TABLE original_table_name;
RENAME new_table_name TO original_table_name;
No comments:
Post a Comment