select tde.id
from t_department tde
start with id in (select td.department_id
from t_department_employee td
where td.state = 1
and td.employee_id = 20820)
connect by prior tde.id = tde.pdepartment_id
from t_department tde
start with id in (select td.department_id
from t_department_employee td
where td.state = 1
and td.employee_id = 20820)
connect by prior tde.id = tde.pdepartment_id
查询的结果为 含根节点的及以下所有的节点