King 100
Kochhar 101 100
Whalen 200 101
Higgins 205 101
Gietz 206 205
De Haan 102 100
Hunold 103 102
Ernst 104 103
Lorentz 107 103
Mourgos 124 100
Rajs 141 124
Davies 142 124
Matos 143 124
Vargas 144 124
Zlotkey 149 100
Abel 174 149
Taylor 176 149
Grant 178 149
Hartstein 201 100
Fay 202 201
比如以HR.EMPLOYEES表为例,要查看上面的数据,可以使用以下语句:
select lpad(' ',2*(level-1),' ') || last_name as pdb_name,employee_id,manager_id from hr.employees
start with employee_id=100
connect by prior employee_id=manager_id
order siblings by employee_id;