Re: Remove duplicate data in Oracle DB

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/02/15
Message-ID: <950614153.2206.0.pluto.d4ee154e_at_news.demon.nl>#1/1


Basically
delete from table x
where x.rowid > (select min(y.rowid)

                           from table y
                           where y.primary_key = x.primary_key)
Could you please refrain as much as possible from crossposting to all Oracle newsgroups?
As far as I am concerned any non-frontend issue is .server.

Hth,

Sybrand Bakker, Oracle DBA

Noira Hadi <r42317_at_email.sps.mot.com> wrote in message news:38A8FEA1.35D33056_at_email.sps.mot.com...
> I have tables in Oracle database which I could not enforce primary key
> due to unavoidable situation. Because of this, I might see duplications
> of data row.
>
> I want to know if it is possible for me to remove the duplicate row(s)?
> Appreciate any reply, reference or any tool that I could use to overcome
> this situation.
>
> Thanks in advance.
>
> Best Regards,
> hadi
>
Received on Tue Feb 15 2000 - 00:00:00 CET

Original text of this message