Subject Re: [firebird-support] Unique index with 2 fields
Author Helen Borrie
At 10:20 PM 30/10/2003 +0000, you wrote:
>I am using the following SQL to create a unique index with 2 fields:
>
> 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.

A unique index is not a unique constraint...

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