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: find duplicates

Re: find duplicates

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 14 Jan 2003 06:33:05 -0800
Message-ID: <2687bb95.0301140633.500f7cbb@posting.google.com>


"s Lehaire" <s.lehaire_at_meilleuregestion.com> wrote in message news:<b00t5c$mvq$1_at_reader1.imaginet.fr>...
> Hi I have to create a primary key on a table but I've got a duplicate data
> in this table
> so i try to find a sql request to find the duplicat rows
> can you help me ?

Look in the SQL manual as the constraint clause for adding a PK has an option to record the rowid of duplicate rows into a exceptions table.

Otherwise build a non=unique index on the key columns and join the table to itself on the keys where the rowid's are not equal. This will produce all rows with multiple records for the same key.

HTH -- Mark D Powell -- Received on Tue Jan 14 2003 - 08:33:05 CST

Original text of this message

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