CONNECT BY Operators
The CONNECT BY
operator can be used to define hierarchical conditions. For more details on the usage of this operator, refer to the CONNECT BY
clause in the SELECT statement section.
Syntax
PRIOR operator::=
CONNECT_BY_ROOT operator::=
Example
SELECT last_name,
PRIOR last_name PARENT_NAME,
CONNECT_BY_ROOT last_name ROOT_NAME,
SYS_CONNECT_BY_PATH(last_name, '/') "PATH"
FROM employees
CONNECT BY PRIOR employee_id = manager_id
START WITH last_name = 'Clark';