Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Foreign Key Constraint in Oracle

user-umh4cSep 26 2023

Hello Everyone,

I would like to below question,

I have 3 tables, A, B and C.

In table C, I am using Foreign Key which could be referenced to PK in A. So, I would like refer my FK in C table to PK in either A or B tables. Basically, I am trying to reference multiple PK's for one FK.

Can we refer one FK to two different PK's from two different tables at the same time? I know it's bad database design ideally, but how could we handle such situation in Oracle database?

Kindly let me know. Any help would be greatly appreciated. Thanks in advance.

Comments
Post Details
Added on Sep 26 2023
2 comments
1,538 views