Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
SELECT FIRST_NAME, LAST_NAME, LEVEL, PRIOR FIRST_NAME || ' ' || PRIOR LAST_NAME MANAGER, CONNECT_BY_ISLEAF il, LTRIM(SYS_CONNECT_BY_PATH(FIRST_NAME, '-'), '-') reporting_chain FROM EMPLOYEES START WITH EMPLOYEE_ID = 101 CONNECT BY PRIOR EMPLOYEE_ID = MANAGER_ID;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear