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 -> Foreign key

Foreign key

From: alex <alienhipopotamus_at_caramail.com>
Date: 20 May 2002 06:03:13 -0700
Message-ID: <1d3c465f.0205200503.4c69d345@posting.google.com>


Hi,
Can someone help me?
I would like to know if it is possible to create a foreign key which reference two columns from different tables. For example, I will have three tables (T1, T2, T3). T1 will have a column named C1.
T2 will have a column named C2 and T3 will have a column named C3. Can C1 refer to C2 and C3, such as that if I insert a line in T1, the Database will look for the value of C1 in C2 and C3. If the value inserted in C1 exists in C2 OR (not AND but OR) in C3, the insert statement will be accept.
Can someone give me the statement to create that kind of relation? Thanks in advance for help.

PS: forgive me for my english, I am not used to post english message! Received on Mon May 20 2002 - 08:03:13 CDT

Original text of this message

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