用SELECT * from table start with col1 = 出发点 connect by col1=col2(叶子列);

解决方案 »

  1.   

    叶子节点是没有孩子节点吧,也就是当前结点列的值不存在于上级结点中,
    你看这样行吗
    select a.* from table a where 当前结点 not in (select 上级结点 from table b)
      

  2.   

    下面语句取出节点1下的所有子节点,包括不是叶子的节点
    select a.* from table a start with 当前结点 = 节点1 connect by prior 当前结点 = 上级结点
    要取出节点1下的所有叶子节点,跟我前面的方法结合下就可以求出来了