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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to delete duplicated records ?

Re: How to delete duplicated records ?

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 23 Nov 1998 15:15:02 GMT
Message-ID: <73bu5m$4le$1@relay1.dsccc.com>


Try

DELETE table_a x
WHERE exists (SELECT 'x'

               FROM   table_a y
               WHERE  x.value1 = y.value1
               AND    x.value2 = y.value2
               AND    x.rowid <> y.rowid
              )

Danil Krasnov (danil_at_maginfo.net) wrote:

: Hello, Gurus !

: There are duplicated records have been appeared in the table... reason is
: not clear, but its not a topic..
: I have to delete duplicated records...

: Example:

: Table A:

: Id Value1 Value2

: 1 111 222
: 2 111 222
: 3 111 222
: 4 333 444
: 5 333 444

: The task - is to delete rows with id's 2, 3, 5...

: Any suggestions?

: Thanks in advance..

: ------------
: Danil Kranov
: danil_at_maginfo.net

--
While Alcatel may claim ownership of all my ideas (on or off the job), Alcatel does not claim any responsibility for them. Warranty expired when u opened this article and I will not be responsible for its contents or use. Received on Mon Nov 23 1998 - 09:15:02 CST

Original text of this message

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