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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How do I locate duplicate rows

Re: How do I locate duplicate rows

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Thu, 30 Nov 2000 20:26:41 GMT
Message-ID: <906d5p$ld9$1@nnrp1.deja.com>

select <primary key>
from <your table>
group by <primary key>
having count(*) > 1

In article <3A25AD6E.9887FF22_at_sbsalaska.com>,   Anthony Valentine <amv_at_sbsalaska.com> wrote:
> Hello All!
>
> I am trying to add a unique constraint to a table, but I get the
> following error:
>
> ORA-02299: cannot validate (ORACLE.LOS160MASTER_UK) - duplicate keys
> found
>
> Is there any way to get Oracle to tell me which rows contain the
> duplicate keys?
>
> Thanks in advance!
>
> Anthony Valentine
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 30 2000 - 14:26:41 CST

Original text of this message

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