CONNECT_BY_ISLEAF

Purpose

For a CONNECT BY query, this function returns whether a row is a leaf within the tree. For more information, refer to the description of the SELECT statement in the Query language (DQL) section.

Syntax

connect_by_isleaf::=

Connect By Isleaf

Example

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