Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: find duplicates
>> 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
![]() |
![]() |