Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Create a foreign key from a field that is part of a mulitple primary key
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:36 CDT
![]() |
![]() |