Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Unique Key
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
![]() |
![]() |