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!

Hierarchy query

664337Oct 29 2008 — edited Oct 29 2008
Hi all,

I am working on oracle 9i.
There is a branch table in database which contains branch_id,branch_name, parent_id etc.

parent_id indicates the parent of a particular branch.

In the table there is multi level hierarchy in parent child relation. For instance branch with branch_id 103 have parent_id 102,
and 102 branch have parent_id 101.
This means that branch 101 has a child 102, branch 102 has a child 103 and so on.

I wanted to find out this hierarchy for a given branch_id.

Can you suggest me any method to do this?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2008
Added on Oct 29 2008
3 comments
415 views