如上,不用再在where 条件里加一个select语句,有什么好办法吗?

解决方案 »

  1.   

    select * from a,b
    where a.id=b.id(+) and instr(a1,b1)>0
      

  2.   

    补充一下 (A表中a1字段的值仅包含B表中 b1字段的值) 意思是想达到(a1 in b1) 这样的效果 而不是 instr(a1,b1)这个效果
      

  3.   


    select a.*
      from a left join b
        on a.a1 = b.b1
     where b1 is not null;
      

  4.   

    左连是用另一个字段连的,即a2对应b2字段,现在还想要过滤掉a表中的某些记录(a1 in b1) 
      

  5.   

    select * from a,b
    where  a1 not in (select b1 from b where a.id=b.id(+))
      

  6.   

    不在where条件里加select语句能实现吗?
      

  7.   

    select a.*  from a left join b on a.a2 = b.b2 and a.a1<>b.b1