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
select * from t1 full join t2 on t1.phone=t2.phone; 你的oracle是什么版本?9i是可以的
select * from t1 union select * from t2 where t1.phone=t2.phone 这样可以不?
select * from t1 union select * from t2 where t1.phone=t2.phone有这种写法的吗?
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
这个应该是对的
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(+)
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
你的oracle是什么版本?9i是可以的
union
select * from t2
where
t1.phone=t2.phone
这样可以不?
union
select * from t2
where
t1.phone=t2.phone有这种写法的吗?
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
这个应该是对的
(select phone from t1 union select phone from t2) all, t1, t2
where all.phone = t1.phone(+) and all.phone = t2.phone(+)