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 to find Duplicate records

Re: How to find Duplicate records

From: Yaroslav Perventsev <p_yaroslav_at_cnt.ru>
Date: Tue, 24 Jul 2001 09:54:37 +0400
Message-ID: <9jj27t$jaf$1@news247.cnt.ru>

Hello!

Try:
CREATE TABLE exception
 (

  row_id                     ROWID,
  owner                      VARCHAR2(30),
  table_name                 VARCHAR2(30),
  constraint                 VARCHAR2(30)
 )
/
ALTER TABLE YOUR_10_MILLION_TABLE
 ADD
 UNIQUE
 ( duplicate_fileld(s)
 )
 EXCEPTIONS INTO EXCEPTION
/

After this manipulation you'll have table exception with rowids of duplpicate records and you may delete them:

delete from YOUR_10_MILLION_TABLE
 where rowid in (select rowid from exception where table_name=YOUR_10_MILLION_TABLE)

Best regards!
Yaroslav.

Shahid Mahmood <Shahid.Mahmood_at_team.telstra.com> ñîîáùèë â íîâîñòÿõ ñëåäóþùåå:2a89f9.0107232026.481337f_at_posting.google.com...
> Hi
>
> I am trying to find out the duplicate records in the table which
> contains over 10 million records. Could you please let me know the
> easiest and quickest way to get it done.
>
> Regards
>
>
> Shahid
Received on Tue Jul 24 2001 - 00:54:37 CDT

Original text of this message

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