PK and FK Compulsion in Self Join In oracle?
In Oracle, while using self join is it necessary to have both Primary and Foreign key in the tables?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Hanook159 reputationPosted Nov 8, 2013, 1:58 AM EST
For logical reasons that is mandatory..
For example Employee table which is having EMployee_id, Manager_id columns.. In the table Manager_id must be subset of Employee_id...
So Employee_id is Primary key and Manager_id is foreign key ( self-reference).....
Nipun TomarRank #90 · 23K reputationPosted Nov 10, 2013, 10:24 PM EST