Sys_Connect_By_Path
SYS_CONNECT_BY_PATH returns the path of a column value from root to node, with column values separated by char for each row returned by CONNECT BY condition. SYS_CONNECT_BY_PATH is valid only in hierarchical queries.
Syntax:
SYS_CONNECT_BY_PATH( column, char )
Example:
SELECT SYS_CONNECT_BY_PATH(ENAME, '/') "Path" FROM EMP START WITH ENAME = 'BLAKE' CONNECT BY PRIOR EMPNO = MGR;
Output:
/BLAKE
/BLAKE/ALLEN
/BLAKE/WARD
/BLAKE/MARTIN
/BLAKE/TURNER
/BLAKE/JAMES