LEVEL

Purpose

This function returns for CONNECT BY queries the level of a node within the tree. For more information, refer to the SELECT statement in Query language (DQL) section.

Syntax

level::=

Example

SELECT last_name,
       LEVEL,
       SYS_CONNECT_BY_PATH(last_name, '/') "PATH"
   FROM employees
   CONNECT BY PRIOR employee_id = manager_id
   START WITH last_name = 'Clark';
Result
LAST_NAME LEVEL PATH
Clark 1 /Clark
Smith 2 /Clark/Smith
Brown 3 /Clark/Smith/Brown