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

Home -> Community -> Usenet -> c.d.o.server -> Re: Unique Key

Re: Unique Key

From: Pete Sharman <psharman_at_us.oracle.com>
Date: Wed, 28 Jul 1999 08:43:06 -0700
Message-ID: <379F250A.6C7C6818@us.oracle.com>


Actually, Oracle CAN check uniqueness with a non-unique index as well. I think this came in 8.0, but I could be wrong on that. If you think about it, the fact that the value already exists in the index is what's important, not the number of times it occurs in the index (anything greater than zero proves it's already there).

HTH. Pete

Brian Peasland wrote:

> >It would advisable to create a unique constraint as opposed to a unique
> >index. I saw some Oracle blurb a while ago that said Oracle may no
> >longer support unique indexes as such in the future (although a unique
> >constraint is implemented with a unique index anyway!)
>
> When you create a unique constraint, Oracle automatically creates an index
> for you. That's the only way it can guarantee uniqueness without doing full
> table scans.
>
> Brian Peasland
> peasland_at_msn.com

--
Regards

Pete


Received on Wed Jul 28 1999 - 10:43:06 CDT

Original text of this message

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