oracle樹形查詢

KLAPT發表於2024-09-04

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
 

相關文章