Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Deleting duplicate records
amit srivastava wrote:
>
> How can one delete all the records and leave one, if you have more than
> 2 duplicates for certain records in a table? , using SQL.
Hi,
this is one way of doing it!
sql> delete from 'table_name' where rowid not in (select min(rowid) from 'table_name' group by 'columns that form your unique index'
Kjell R. Received on Thu Feb 27 1997 - 00:00:00 CST