Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Deleting duplicate records

Re: Deleting duplicate records

From: Kjell R. Christensen <krc_at_nera.no>
Date: 1997/02/27
Message-ID: <33154C36.69DD@nera.no>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US