递归查询路径:
select * from t_db_organize connect by prior fartherid=id start with id='139312' order by id asc
行转列:
select replace(wm_concat(to_char(name)),',',' > ') name from(select * from t_db_organize connect by prior fartherid=id start with id='139312' order by id asc);
wm_concat:行转列,默认逗号分隔,中文会乱码,使用to_char可以避免
原文链接:https://www.f2er.com/oracle/205832.html