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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: relationship between unique index and constraint

Re: relationship between unique index and constraint

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Sat, 19 Apr 2003 16:41:39 -0800
Message-ID: <F001.0058577D.20030419164139@fatcity.com>


Hi Arup,

I might be mentioning the bleeden obvious here, but if the constraint is deferrable, Oracle will use a non-unique index to police the constraint. If a suitable non-unique index exists before a unique constraint is created, Oracle will simply use it.

Cheers

Richard

David,

Here is the lowdown on the issue:

When you create a unique CONSTRAINT, Oracle creates a unique INDEX to enforce it.
When you create a unique INDEX, a constraint is NOT automatically created, but the rdbms engine reports the same message as if the constraint name was violated.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Richard Foote
  INET: richard.foote_at_bigpond.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (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). Received on Sat Apr 19 2003 - 19:41:39 CDT

Original text of this message

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