查询深圳分公司以及它的下级部门
select *
from dept_info
where is_valid = 'Y'
start with dept_no = '10'
connect by prior dept_no = parent_dept_no;
查询深圳分公司以及它的上级部门
select *
from dept_info
where is_valid = 'Y'
start with dept_no = '10'
connect by dept_no = prior parent_dept_no;