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: Damjan S. Vujnovic <damjan_at_NOSPAMgaleb.etf.bg.ac.yu>
Date: Tue, 14 Jan 2003 14:01:49 +0100
Message-ID: <b01201$p3c$1@news.etf.bg.ac.yu>


>> 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? <<

Try this:

select prim_key, count(*) as duplicates
from table
group by prim_key
having count(*) > 1

regards,
Damjan S. Vujnovic

University of Belgrade
School of Electrical Engineering
Department of Computer Engineering & Informatics Belgrade, Yugoslavia

http://galeb.etf.bg.ac.yu/~damjan/ Received on Tue Jan 14 2003 - 07:01:49 CST

Original text of this message

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