/* Performing Oracle CONNECT BY */

SELECT employee_id, manager_id, LEVEL, 
       LPAD(' ',LEVEL,'>') || fname ||' '|| lname as fullname
FROM    hierarchy
START WITH manager_id is null
CONNECT BY PRIOR employee_id=manager_id
ORDER BY level, lname