Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Foreign key
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
![]() |
![]() |