写错了,想得到的结果为:
PHONE SX   AREA
111   1     a
222   2     b
333   3     
444         a

解决方案 »

  1.   

    PHONE SX   AREA
    111   1     a
    222   2     b
    333   3     
    444         aselect nvl(t1.PHONE,t2.PHONE) PHONE,t1.sx,t2.area
    from t1 full join t2 on t1.PHONE = t2.PHONE
      

  2.   

    select * from t1 full join t2 on t1.phone=t2.phone;
    你的oracle是什么版本?9i是可以的
      

  3.   

    select * from t1
    union
    select * from t2
    where
    t1.phone=t2.phone
    这样可以不?
      

  4.   

    select * from t1
    union
    select * from t2
    where
    t1.phone=t2.phone有这种写法的吗?
      

  5.   

    PHONE SX   AREA
    111   1     a
    222   2     b
    333   3     
    444         aselect nvl(t1.PHONE,t2.PHONE) PHONE,t1.sx,t2.area
    from t1 full join t2 on t1.PHONE = t2.PHONE
      
    这个应该是对的
      

  6.   

    select all.phone, t1.sx, t2.area from 
        (select phone from t1 union select phone from t2) all, t1, t2
    where all.phone = t1.phone(+) and all.phone = t2.phone(+)