标签:
从根节点向叶子节点遍历:
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,...)
-> 适用于不用显示所有树结构的情况下条件查找树,只显示符合条件部分的树。
connect by prior...start with...
标签:
原文地址:http://www.cnblogs.com/xuhj/p/4318810.html