Tags

,

Finding and deleteing the duplicate rows of a table in Oracle Database.

DELETE FROM OWNER.TABLEx z
WHERE z.ROWID IN
(SELECT a.ROWID
FROM OWNER.TABLEx a
JOIN
OWNER.TABLEx b
ON a.COLUMN1 = b.COLUMN1
AND a.COLUMN2 = b.COLUMN2
AND a.COLUMN3 = b.COLUMN3
AND a.ROWID > b.ROWID);

Advertisements