Subject Re: [firebird-support] Foreign Key on 2 or more columns
Author Martijn Tonies
Hello Stephane,

> 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 ?

How do you know it's pointing to ContactA or ContactB?

It sounds like your design needs to be modified, it sounds wrong.

With regards,

Martijn Tonies
Upscene Productions

Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!

Database questions? Check the forum: