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

Home -> Community -> Usenet -> c.d.o.server -> creating a foreign key referencing a non-primary key

creating a foreign key referencing a non-primary key

From: Asya Kamsky <asya_at_bayarea.net>
Date: Wed, 17 Mar 2004 21:33:46 -0000
Message-ID: <105hh1q6ti25bfb@corp.supernews.com>


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/rock
Received on Wed Mar 17 2004 - 15:33:46 CST

Original text of this message

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