Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> foreign key references two different table?
I have 3 tables.
parent1 (id, ...)
parent2 (id, ...)
child (id, memberid, type)
child.memberid came from parent1.id and parent2.id. child.type distinguishs where the memberid are from parent1 or parent2 table.
I would like to have a fk relationship between child.memberid -> parent1.id and parent2.id. However, I can't create two separate fks because parent1.id and parent2.id together are not unique.
Is there a way to create one fk to two different tables?
Thanks.
Susan
Received on Fri May 30 2003 - 17:13:48 CDT