select N.fld form N,M where N.f1 = M.f1(+)

解决方案 »

  1.   

    create table a
    (a varchar(100),
    b varchar(100));
    create table b
    (a varchar(100),
    b varchar(100));
    insert into  a values ('1','a');
    insert into  a values ('2','b');
    insert into  a values ('3','c');
    insert into  b values ('2','e');
    insert into  b values ('3','f');
    select a.a,a.b,b.b as bb  from a,b where a.a=b.a(+)--就这句
    drop table a;
    drop table b;
      

  2.   

    SELECT a.*,b.* FROM  a LEFT OUTER JOIN b WHERE a.user_name=b.user_name
      

  3.   

    不行,大哥,我的b.a是一个连接:如b.a||b.b,这样的,加上(+)就出现没有表达式,怎么办啊?
      

  4.   

    select * 
      from ( select a || b ab from B) B,A
     where B.ab = a.a(+)
      

  5.   

    是我没说清楚,我的a||b 在where 后,所以才出现没有表达式,另外,a表里还有重复的量呢,好难解决啊!
      

  6.   

    没问题的:
       select * 
         from ( select a || b ab from B) B
              ,( select distinct * from A) A
        where B.ab = A.a(+)