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

Home -> Community -> Usenet -> c.d.o.tools -> Re: how can I delete duplicate rows?

Re: how can I delete duplicate rows?

From: Ludo Van Helleputte <Ludo.van.helleputte_at_be.pwcglobal.com>
Date: Thu, 24 May 2001 11:16:58 +0200
Message-ID: <3b0fff41_4@news2.prserv.net>

Haven't tried this now, but I remember something like ...

Try and verify, use at your own risk !!

delete from table a

    where exists (select rowid from table b where a.col1 = b.col1 and a.col2 = b.col2 and a.rowid < b.rowid)

Should be pretty close to what you want to do ...

"Mike Moore" <hicamel_at_mail.home.com> wrote in message news:YgEO6.26292$%i7.22672421_at_news1.rdc1.sfba.home.com...
> How can I delete duplicate rows from a table and only leave
> one in the table? Lets assume that all of the columns have
> identical values.
>
> Thanks,
> Mike
>
>
Received on Thu May 24 2001 - 04:16:58 CDT

Original text of this message

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