select nvl(a.id,b.id) id,a.content,b.content1 from a full outer join 
on a.id=b.id

解决方案 »

  1.   

    sorry!
    select nvl(a.id,b.id) id,a.content,b.content1 from a full outer join b
    on a.id=b.id
      

  2.   

    select id,max(decode(rm,1,content)) content,max(decode(rm,2,content1)) content1 from
    (select id,content,null content1,1 rm from a
    union all
    select id,null content,content1,2 rm form b)
    group by id
      

  3.   

    select nvl(a.id,b.id) id,a.content,b.content1 from a full outer join b
    on a.id=b.id
      

  4.   

    没有办法8i的完全连接是个麻烦的问题。select a.id,a.content,b.content1 from a,b where a.id=b.id(+)
    union all
    select id,null,content1 from b where not exists (select * from a where id=b.id)这个至少比你现在的快。
      

  5.   

    select nvl(a.id, b.id) id, a.content1 content, b.content1
    from   a full outer join 
           b on 
             a.id = b.id