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: Heggelund <d92hegge_at_ix_prod.hfk.mil.no>
Date: 1997/02/27
Message-ID: <1997Feb27.154011.1298@ix_prod.hfk.mil.no>#1/1

Hi

delete from dupl_table t1
where exists (select null

               from   dupl_table t2
               where  t1.column_1 = t2.column_1
               and    t1.column_2 = t2.column_2
               ....
               and    t1.rowid < t2.rowid)
/

This should do the trick.

Rgds,

Steinar Heggelund                    

amit srivastava (amit_at_intrex.net) 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.
Received on Thu Feb 27 1997 - 00:00:00 CST

Original text of this message

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