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
Mladen Gogala wrote:
> BTW, you don't need unique index to have a unique constraint.
Well, yes and no. In theory it is possible to have a unique constraint without an index. But Oracle will create an index for you when you create a unique constraint. You can test this by creating a unique constraint and querying the all_indexes table. There's an index there with your constraint name.
I don't think there's any functional difference between
CREATE UNIQUE INDEX ... and
ALTER TABLE FOO
ADD CONSTRAINT BAR
UNIQUE (COL1)
> You can have a unique constraint on the column even the values in the column are not unique.
I'm not sure what this means.
//Walt Received on Mon Jan 23 2006 - 15:57:36 CST
![]() |
![]() |