Re: unique constraint and unique index "Mark A" <nobody@nowhere.com> wrote in message
news:esednUU_j4gUUTnZnZ2dnUVZ_vidnZ2d@comcast.com. ..
> A unique constraint will automatically created a unique index, unless a
> unique index already exists on the same columns.
>
> A unique constraint must only contain columns that are defined as not null
> (like a PK). A unique index can have a nullable column (but null values
> are not ignored and they are counted in determining uniqueness).
>
> A foreign key on a child table can reference a unique constraint on a
> parent table (and obviously it can also reference a PK on a parent table).
>
Correction, first sentence should read:
A unique constraint will automatically create a unique index, unless a
unique index already exists on the same columns. |