Well, if you plan to use it as a unique key, the best way is with the
exception clause in constraint statement.

Regards.

> -----Mensaje original-----
> De:   Larry Taylor [SMTP:[EMAIL PROTECTED]]
> Enviado el:   martes 20 de febrero de 2001 17:57
> Para: Multiple recipients of list ORACLE-L
> Asunto:       How to find DUPLICATE KEYS FOUND
> 
> Hi all,
> 
> How can I find duplicate keys and drop the duplicate? My database is 8.1.6
> and I tried the following
> and got this error:
> 
> CREATE UNIQUE INDEX I_SA_C_OWNERID_C_NAME ON P_ANSWER (P_ID , P_NAME ) 
> PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536) LOGGING
> TABLESPACE
> USERS;
> 
> ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
> 
> Thanks in advance.
> 
> Larry
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: Larry Taylor
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California        -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Trassens, Christian
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to