放里面行不?A.fld1=substr(B.fld1(+),1,2);

解决方案 »

  1.   


    select A.fld1,
           B.* 
    from haha A ,(select * from haha where fld2='hehe' ) B
    where A.fld1=substr(B.fld1(+),1,2); 
      

  2.   

    或:
     
    select A.fld1,
           B.* 
    from haha A left join 
    (select * from haha where fld2='hehe' ) B
    where A.fld1=substr(B.fld1,1,2); 
      

  3.   

    更正:
    select A.fld1,
           B.* 
    from haha A left join 
    (select * from haha where fld2='hehe' ) B
    on A.fld1=substr(B.fld1,1,2);
      

  4.   

    select A.fld1,
           B.* 
    from haha A ,(select * from haha where fld2='hehe' ) B
    where A.fld1(+)=substr(B.fld1,1,2);