3 回答

Smart貓小萌
TA貢獻(xiàn)1911條經(jīng)驗(yàn) 獲得超7個(gè)贊
when 之后加條件 then之后加動(dòng)作 end一般用來(lái)結(jié)束語(yǔ)句用的
舉例:
when (a>10) then
a := a+2;
。。。
left outer join:左外連接,將左邊的表中所有數(shù)據(jù)都包括進(jìn)去 右邊的表只有相關(guān)的
表S(sno,sname)數(shù)據(jù):
001 王平
002 李軍
003 孫燕
004 林雪
。。。
表C(cno,cname)數(shù)據(jù)
C01 數(shù)學(xué)
C02 語(yǔ)文
表SC(sno,cno,grade)數(shù)據(jù):
001 C01 98
001 C02 97
select *
from s,sc
where s.sno = sc.sno(+) ----左外連接“+”在右邊
結(jié)果:
sno sname cno grade
001 王平 C01 98
001 王平 C02 97
002 李軍 null null
003 孫燕 null null
004 林雪 null null
。。。
- 3 回答
- 0 關(guān)注
- 543 瀏覽
添加回答
舉報(bào)
0/150
提交
取消