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: Unique index vs. unique constraint

Re: Unique index vs. unique constraint

From: IT Division <gbkit_at_moc.kw>
Date: Thu, 26 Aug 1999 12:42:30 +0300
Message-ID: <37C50C06.299C04A8@moc.kw>


Hi Michael,

There is no functional difference between these two because they are actually two sides of the same function. You cannot create a unique constraint
without creating a unique index on the column (or columns). And vise versa, if
you create an unique index, you will put a unique constraint as well. I would say that unique constraint is implemented through unique index.

VK.

Michael Hjorth wrote:

> What is the functional difference between a unique index and a unique
> constraint?
> I know the latter has a constraint as well as the index, but apparently
> it enforces the same restrictions on the database as the unique index.
> Or did I get it wrong?
> Why would I prefer one over the other in a particular case?
>
> Thank you for any comments.
>
> Michael.
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Thu Aug 26 1999 - 04:42:30 CDT

Original text of this message

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