Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Duplicate rows
If you have more than two duplicate rows, the ">" in step 3) should be
an "=".
-----Original Message-----
Rachel Carmichael
...
3) delete the duplicates in the smaller table (runs a LOT faster than trying to delete the duplicates from the source)
...
Sample code below:
...
JRK> with a ">" in the condition below you would end up listing JRK> only one of the duplicate rows in the "dupes" table
3) delete from dupes a where rowid = (select min(rowid)
from dupes b
where a.unique_column1=b.unique_column1
and a.unique_column2=b.unique_column2
.... repeat above for all columns
)
/
...
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Thu Jun 03 2004 - 19:04:12 CDT
![]() |
![]() |