查询SQL:
select * from t_system_department
start with id =1
--找ID为13的父级记录
select *
from t_system_department t
start with id=13
connect by prior parent_id = id;
--找ID为13的子级记录
select *
from t_system_department
start with id=13
connect by prior id = parent_id;