Skip to Main Content

SQL & PL/SQL

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!

Does a Foreign key HAVE to have a UNIQUE or PK column as a reference?

2776946Jun 9 2015 — edited Jun 9 2015

Firstly I tried it, from what i saw yes it has to be Unique or PK. Secondly I'm pretty sure I read somewhere where it has to be PK or unique. Thirdly I checked oradocs and some other pages, the closes thing I got to an answer

A foreign key constraint (also called a referential integrity constraint) designates a column as the foreign key and establishes a relationship between that foreign key and a specified primary or unique key, called the referenced key.


this implies, but doesn;t explicitly state that it HAS to be a PK or a UNIQUE.


Basically I want a simple yes/no answer just to give me some peace of mind. I don't mean to waste time, but oracle changes from time to time, and I'd rather get a confirmation from someone with more experience/knowledge.


Thanks!

This post has been answered by unknown-7404 on Jun 9 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 7 2015
Added on Jun 9 2015
2 comments
7,731 views