oracle树形查询

1.查找某个节点下面子孙节点

select * from table start with id=1 connect by prior id=pid

2、查找节点的祖先节点

select * from table start with id=5 connect by prior pid=id
 
posted @ 2024-09-04 22:02  KLAPT  阅读(3)  评论(0编辑  收藏  举报