Tree structure in sql in Oracle.How to show tree,child nodes and parent nodes in SQL Oracle
I would like to show a tree structure in SQL with child nodes and parent nodes. I have a table like: Employee ------------- ID (int) FirstName (varchar) LastName (varchar) ParentID (int) Job (varchar) which represents an employee. ParentID represent the manager of the employee has. I would like to have this table only with this structure. I would like to show the whole tree structure. I would like to show only the children nodes I would like to show only the parent nodes SampleDataImage Query - The whole tree structure : SELECT * FROM Employee START WITH ParentID IS NULL CONNECT BY PRIOR ID =