Subject | Re: [firebird-support] Unique index with 2 fields |
---|---|
Author | Helen Borrie |
Post date | 2003-10-30T22:52:57Z |
At 10:20 PM 30/10/2003 +0000, you wrote:
However, if you have a unique index or constraint already on Person_ID, you
won't be able to have also a unique index on Person_ID + another non-unique
column. If the unique index across Person_ID and Sequence is what you
really want, then drop the unique index on Person_ID first.
Helen
>I am using the following SQL to create a unique index with 2 fields:A unique index is not a unique constraint...
>
> CREATE UNIQUE INDEX IDXPERSON_ID ON PAYCHECKINFO (PERSON_ID,
>SEQUENCE);
>
>Yet after creating the DB, when I view the unique constraint in IB
>Expert I see that only PERSON_ID field is in the unique index.
However, if you have a unique index or constraint already on Person_ID, you
won't be able to have also a unique index on Person_ID + another non-unique
column. If the unique index across Person_ID and Sequence is what you
really want, then drop the unique index on Person_ID first.
Helen