Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Create a foreign key from a field that is part of a mulitple primary key

Create a foreign key from a field that is part of a mulitple primary key

From: naud <naudjf_at_yahoo.fr>
Date: 2 Sep 2004 08:17:40 -0700
Message-ID: <1e1a7efc.0409020717.6da3fb7@posting.google.com>


Hi,

i had a table named T_A, with a double primary key : (A,B)

Then i created a table named T_B with a field : C.

I want this field T_B.C to take only values that already exist in field T_A.A.

So i tried to create a foreign key on my field T_B.C, pointing on the field T_A.A : an error message appeared "not possible to create a foreign key on a field that is not a primary key".

How can i solve this....? If U have any idea, please mail me !!

THANX very much. Received on Thu Sep 02 2004 - 10:17:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US