Tuesday, 9 June 2015

Query to get the Last Leaf with Path

Query to get the Last Leaf with Path:

 

Table Structure and Data:

 



Query To get the Identify last node of a branch with its Path:


select btree.* , sys_connect_by_path(emp,'/') PATH ,connect_by_isleaf  INDICATOR  from btree  start with Manager is null

connect by nocycle prior EMP=MANAGER order by 1;



No comments:

Post a Comment