Creating a foreign key on the Union of two tables

From: saads(at)umich(dot)edu (Saad Saeed)
To: pgsql-sql(at)postgresql(dot)org
Subject: Creating a foreign key on the Union of two tables
Date: 2003-04-06 21:53:50
Message-ID: a811aba0.0304061353.664e2263@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have 2 tables "A" and "B" in mySQL. They both have an attribute 'id'
which is unique between the 2 tables. I want the union of these 2
attributes to be a foreign key in a 3rd table "C". How do I specify
this constraing in sql (mySQL) in table C? And for complex reasons I
cannot merge the 2 tables A and B.

Thanks,

-Saad

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message CN 2003-04-07 04:00:41 Re: Extraordinary Full Join
Previous Message Stephane 2003-04-06 21:09:32 Re: Difficult query (for me)