Programmer's Blog

Programmer's reference

Monthly Archives: October 2016

[SQL] delete duplicated rows

DELETE FROM table
WHERE rowid not in
(SELECT MIN(rowid)
FROM table
GROUP BY column1, column2);
Advertisements