Oracle Ò»¸öÊÓͼÎÊÌâ
SQL> create table s as
2 select nvl(a.n1,b.n1) as n1,nvl(a.n2,b.n2) as n2,n3,n4,(n4-n3) as n5 from
a full join b on a.n1=b.n1 and a.n2=b.n2;
Table created.
SQL> select * from s;
N1 N2 N3 N4 N5
-- ---------- ---------- ---------- ----------
A 456 34 55 21
B 135 345 643 298
B 456 34 55 21
A 123 235
B 332 534
C 135 643
A 789 342
B 365 774
8 rows selected.
SQL> select * from s where N1='A';
no rows selected
SQL> select * from a where N1='A';
Ïà¹ØÎÊ´ð£º
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
¸÷λ´ó¸ç£¬°ï¸öæ¡£
ϸöOracle for vista °æ±¾µÄ°²×°ÊÔÊÔ
10GºÍ11GµÄ
http://www.oracle.com/technology/software/products/database/index.html
------------------------------------------- ......
select sum£¨a.t)from ta a group by ta.a,ÕâÌõÓï¾ä½«±ítaÖеÄÊý¾Ý°´ÕÕa×ֶηÖ×é»ã×Üt×ֶΡ£
½á¹û±ÈÈ磺
3 30
4 50
ÎÒÏëµÃµ½Õâ¸ö½á¹û£º
1 0
2 0
3 30
4 50
5 0
Õâ¸ö½á¹û£¬ÇëÎÊsqlÓï¾äÔõôд£¿¶àл
nobody ......
¼ÙÉètable01 ÖÐÓÐ ÒÔÏÂ×ÊÁÏ
emp_no emp_name
------- ------------
0001 TOM
0002 JOHN
0003 MARY
³£Óõ绰
¶øÎÒÃÇÒªµÃµ½ÒÔϵÄOUTPUT (»òÊǸ÷ÖÖÆäËûµÄoutput)
0001,TOM
0002,JOHN
......