sql

Remove duplicate rows

Tag(s):

DELETE   FROM TableName
WHERE    rowid NOT IN
         (
         SELECT  min(rowid)
         FROM    TableName
         GROUP BY
            column1, 
            column2, 
            columnX
         );

Find table name

Tag(s):

Change YOUR_DB_NAME and %YOUR_TABLENAME_PATTERN% according to your case.

Subscribe to RSS - sql