Subject Re: [ib-support] Fw: Problem creating foreign key
Author Luiz
> >I am in doubt now.
> >
> >He have a Unique Index as:
> >
> >Create Unique Index xSkyStatusDescription on SkyStatus(Description)
> >
> >Does the FKs don't can be create referencing a Unique Index?
>
> Not in current versions.
>
> However, I stumbled across some doc in the Embedded SQL Guide that
suggested you could do it, so I tried it...but no.
>
> I seem to remember you could do it in 5.1 which supported Foreign keys but
not cascades...but that might just be loose pages in my memory. I don't
have a 5.1 server any more to confirm or deny.

Helen,

I achieve to do it with FB RC2 adding a unique constraint as:

alter table T1 add constraint un_constraint unique (f1,f2).

After this I can create a FK referencing T1 in (f1,f2).

Regards,
Luiz.