Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> creating a foreign key referencing a non-primary key
Is there a way to create a foreign key that references a column
that's not a primary key of the other table?
(it happens to be part of a composite primary key).
Example:
t1 (id, version, primary_key (id, version))
t2 (t1_id foreign_key on t1(id)) <- not allowed
-- Asya Kamsky Come see my band, Monday March 29th, 11pm(sharp) @ Tongue and Groove in SF http://www.evite.com/asya@bayarea.net/rockReceived on Wed Mar 17 2004 - 15:33:46 CST
![]() |
![]() |