时间:2021-07-01 10:21:17 帮助过:84人阅读
例如:
--向下遍历
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