oracle 递归求父节点 级别等

来源:互联网 发布:外交趣事 知乎 编辑:程序博客网 时间:2024/06/03 13:19

select * from (select org_id,org_name,level,substr(SYS_CONNECT_BY_PATH(org_id||'_'||org_name||'_'||level,','),2) 

from iap_organization start wITh parent_id is null connect by  prior  org_id=parent_id)  where 1=1