Re: duplicates
From: <James>
Date: 1995/08/02
Message-ID: <1995Aug2.124505.13608_at_newton.ccs.tuns.ca>#1/1
Date: 1995/08/02
Message-ID: <1995Aug2.124505.13608_at_newton.ccs.tuns.ca>#1/1
>ucfaabe_at_ucl.ac.uk (Mr Angus Beare) wrote:
>
>I have a table that I want to create a unique index for
>but I can't because of duplicates. Oracle won't tell
>me where they are.
>
>Does anyone know a quick way to find duplicate records?
>
>thanks for any suggestions
>
>Gus
>
>--
>Angus Beare
SELECT key_field, ROWID FROM table
WHERE key_field IN
(SELECT key_field FROM table
GROUP BY key_field
HAVING COUNT (key_field) > 1);
This will show the key-field and where they are located of all duplicated keys.
James Richard (JRICHARD_at_TUNS.CA)
"No Assembler Required!"
Received on Wed Aug 02 1995 - 00:00:00 CEST