例如:
--向下遍历
select * from tablename START WITH id= ‘111‘ CONNECT BY PRIOR id=parentid
--不包含parentid
select * from tablename START WITH parentid= ‘111‘ CONNECT BY PRIOR id=parentid
--向上遍历
select * from tablename START WITH id= ‘111‘ CONNECT BY PRIOR parentid =id
--不包含parentid
select * from tablename START WITH parentid= ‘111‘ CONNECT BY PRIOR parentid =id
oracle递归树形结构sql
标签:connect 树形结构 ora tar from oracl star parentId bsp
本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉 本文系统来源:https://www.cnblogs.com/xtjatswc/p/13181852.html