Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Dupes
In Article<335ADC4B.7415_at_ix.netcom.com>, <bbristol_at_ix.netcom.com> writes:
> Hello,
>
> I have two tables, a base and an incremental with the same layout.
>
> They somehow now have duplicate rows.
>
> I want to find the dupes and ultimately, delete them from the
> incremental table.
>
> What's the best method of doing so?
>
> Thank you!
>
> -Bruce
Use rowid eg.
select name1.x, name1.rowid from
tabx name1, tabx name2
where name1.x = name2.x
and name1.rowid not = name2.rowid;
where x is the supposedly unique key, and tabx is the table. Now replace the select with delete syntax and away they go. Carefull though - test with a select first ;)
Cheers
Lourens
lous_at_hotmail.com
Received on Tue Apr 22 1997 - 00:00:00 CDT