select parent,child from yout_table start with parent='a' connect by prior child=parent;

解决方案 »

  1.   

    SQL> select parent,child from t start with parent='a' connect by prior child=par
    ent;PAR CHI
    --- ---
    a   b
    b   d
    d
    b   b1
    b1
    b   b2
    b2
    a   c
    c   c1
    c1
    a   ePAR CHI
    --- ---
    e   e1
    e1
    e   e2
    e2已选择15行。SQL>I had got it
      

  2.   

    你可以试试这个
    select p,c from table start with p='a' connect by prior c=p
      

  3.   

    或者:
    select * from t 
    where parent in (select child from t where parent='a') or t.parent='a';
      

  4.   

    同意 black_dragon(半仙)的写法,可以实现:
    select parent,child from yout_table start with parent='a' connect by prior child=parent;