要學的東西很多,一直在努力中............!
希望佛祖赐予我智慧吧!阿门!!!
SQL中的FULL JOIN 問題
上一篇 /
下一篇 2008-04-02 13:45:49
/ 个人分类:ORACLE 開發
SQL> with a as (select 'a' name,1 num1 from dual
H8I/if
o%j,_l9t0 2 union
\"T9r$cRGC0 3 select 'b' name,2 num1 from dualITPUB个人空间k|,a:NNVLXj_
4 unionITPUB个人空间%GP
V$Z&e/l;Y
5 select 'c' name,3 num1 from dualITPUB个人空间&j1|8E {pFo
6 ),
\J*B9b&r&l9W0 7 b as (select 'a' name,1 num2 from dualITPUB个人空间QML?7B!?u
8 union
],y dzeu'j_0 9 select 'd' name,2 num2 from dualITPUB个人空间^"hl[y,n8H6T
10 unionITPUB个人空间\gv`d:y
11 select 'e' name,3 num2 from dualITPUB个人空间}?2^iA\m
12 )ITPUB个人空间,HXO/zs`
13 selectnvl(a.name,b.name)name,a.num1,b.num2 from a full joinb on a.name=b.nameITPUB个人空间n6eu8j]
14 /ITPUB个人空间p9oOa4}6Q
~p,w FZ
ITPUB个人空间xRS7Vc)\$zci6~
NAME NUM1 NUM2ITPUB个人空间wL&Nk]%XM
---- ---------- ----------ITPUB个人空间iqa
C:U8~p
a 1 1