Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Test if Data for a Field is UNIQUE
Walt wrote:
> I don't think there's any functional difference between
>
> CREATE UNIQUE INDEX ...
>
> and
>
> ALTER TABLE FOO
> ADD CONSTRAINT BAR
> UNIQUE (COL1)
Actually there is. One, of course, being the ability to defer
or disable a constraint ... but almost as important is the fact
that with a UNIQUE INDEX no entry can be found in user_constraints
whereas with the creation of a UNIQUE CONSTRAINT you will find
entries in both user_constraints and user_indexes.
I advise my students to NEVER build a unique index.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Tue Jan 24 2006 - 12:25:57 CST
![]() |
![]() |