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?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nipun TomarPosted Nov 11, 2013, 3:24 AM
HanookPosted Nov 8, 2013, 6:58 AM
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).....