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: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 14 Jan 2003 09:27:10 -0800
Message-ID: <92eeeff0.0301140927.242c068d@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 ?

SELECT your_pk_to_be_column, count(*) count FROM your_table
GROUP BY your_pk_to_be_column
HAVING count(*) > 1;

Regards
/Rauf Sarwar Received on Tue Jan 14 2003 - 11:27:10 CST

Original text of this message

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