connect by prior...start with...
时间:2015-03-06 18:32:37
收藏:0
阅读:137
从根节点向叶子节点遍历:
select * from emap e connect by prior e.mapid=e.parentid start with e.mapid=3
从叶子节点反向搜索根节点:
select * from emap e connect by prior e.parentid=e.mapid start with e.mapid=1846
select * from emap e connect by prior e.parentid=e.mapid start with e.mapid in (1846,1847,...)
-> 适用于不用显示所有树结构的情况下条件查找树,只显示符合条件部分的树。
原文:http://www.cnblogs.com/xuhj/p/4318810.html
评论(0)