Subject | Re: [ib-support] Unique constraint not an index? was Re: Error:Object is in use |
---|---|
Author | Helen Borrie |
Post date | 2001-02-24T02:38:31Z |
At 07:03 PM 23-02-01 -0500, the Mother of InterBase wrote:
To kind of answer the original question (and mine, now) - why should I bother to create a unique constraint if it's all-same-different if I make a unique index instead? Is this "optionality" there to service some sort of backward compatibility?
Cheers,
H.
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>All -RIGHTY-HO THEN. :))
>
> The UNIQUE constraint does create an index called RDB$UNIQUE<n>
>unless the constraint is named. An named constraint creates an index
>with a name that reflects the constraint name. Those are normal
>(and desirable) indexes as far as the optimizer is concerned. That's
>been the behavior since forever - from our first SQL implementation.
To kind of answer the original question (and mine, now) - why should I bother to create a unique constraint if it's all-same-different if I make a unique index instead? Is this "optionality" there to service some sort of backward compatibility?
Cheers,
H.
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________