标签:
select * from S_dept
where CODE
in(select sd.code from s_dept sd
start with sd.code=‘GDKB‘
connect by prior sd.code= sd.parent_code)
查找一个节点(GDKB)的所有直属子节点(所有后代)。
select * from S_dept
where CODE
in(select sd.code from s_dept sd
start with sd.code=‘GDKB‘
connect by sd.code=prior sd.parent_code)
查询当前的所有直属父节点
oracle 多级菜单查询 。start with connect by prior
标签:
原文地址:http://www.cnblogs.com/zhangchenglzhao/p/5509470.html