Subject | Re: [firebird-support] Foreign Key on 2 or more columns |
---|---|
Author | Marco Antonio Abreu |
Post date | 2009-09-23T13:10:18Z |
If you want Foreign Keys Constraints you should have two fields, ID_ContactA
and ID_Contact_B. It is necessary for all relational databases.
You can put an aditional constraint (not foreign key one) to check and
permit only one of then to be filled, the other field should be NULL.
[]'s,
Marco
2009/9/23 svanderclock <svanderclock@...>
Marco Antonio Abreu
mabreu.ti@...
System Analist/Developer
[Non-text portions of this message have been removed]
and ID_Contact_B. It is necessary for all relational databases.
You can put an aditional constraint (not foreign key one) to check and
permit only one of then to be filled, the other field should be NULL.
[]'s,
Marco
2009/9/23 svanderclock <svanderclock@...>
>--
>
> hello,
>
> in tableA i have some record with the field ID_contact that point to the
> table ContactA or to the table ContactB. so in this way i can not create a
> foreign key on my field ID_Contact.
>
> How to do ? i thing by stored procedure, but what is the best way and the
> most efficient way to do that in store procedure ?
>
> thanks you by advance
>
> --
> stephane
>
>
> http://www.arkadia.com/usa/real-estate/for-sale/france/ile-de-france/paris/listings/
>
> http://www.arkadia.com/fra/immobilier/vente/france/ile-de-france/paris/annonces/
>
> http://www.arkadia.com/rus/real-estate/for-sale/france/ile-de-france/paris/listings/
>
>
>
Marco Antonio Abreu
mabreu.ti@...
System Analist/Developer
[Non-text portions of this message have been removed]