已知父节点
select t.* from PGXM_DEPT t start with t.dept_id ='196420293856727040' connect by prior t.dept_id = t.father_id
已知子节点
select t.*,level from PGXM_DEPT t start with t.dept_id in('BE2A74A11E98CBF6E0539A1414AC38D1','BE2A74A11E99CBF6E0539A1414AC38D1','BE2A74A11E9DCBF6E0539A1414AC38D1','BE2A74A11E9ECBF6E0539A1414AC38D1') connect by t.dept_id = prior t.father_id and father_id!='0'
Oracle 递归查询
最新推荐文章于 2024-08-26 23:38:02 发布