Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Finding duplicate rows in a table

Re: Finding duplicate rows in a table

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 1997/09/09
Message-ID: <01bcbce8$693d7080$b1040059@billyv.vslabs.co.za>#1/1

chris <x_at_worldnet.att.net> wrote in article <34142F08.768F_at_worldnet.att.net>...
> I don't know how, but when I try and copy one of my tables to another
> server across the net, I get a constraint violation on the primary key.
> How can I find the rows in the original table that have duplicate
> primary key information (the primay key consists of two columns).
>

SELECT
  primary_key, count(*)
FROM foo
GROUP BY primary_key
HAVING count(*) > 1

regards,
Billy Received on Tue Sep 09 1997 - 00:00:00 CDT

Original text of this message

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