Showing posts with label delete duplicate rows. Show all posts
Showing posts with label delete duplicate rows. Show all posts

Monday, February 6, 2012

How to delete duplicate rows in a table in oracle?

Here is the query for the same.

DELETE FROM
table_name A
WHERE
a.rowid >
(
SELECT
min(B.rowid)
FROM
table_name B
WHERE
A.col1 = B.col1
AND
A.col2 = B.col2
);