課程
/數(shù)據(jù)庫
/Oracle
/Oracle數(shù)據(jù)庫開發(fā)必備利器之PL/SQL基礎(chǔ)
2017-05-24
源自:Oracle數(shù)據(jù)庫開發(fā)必備利器之PL/SQL基礎(chǔ) 2-4
正在回答
這道題用CASE語句會好一點
我執(zhí)行可以啊
set serveroutput on;
declare
pnum number:=#
begin
if pnum=0 then dbms_output.put_line('你的選擇是0');
elsif pnum=5 then dbms_output.put_line('你的選擇是5');
elsif pnum=1 then dbms_output.put_line('你的選擇是1');
elsif pnum=2 then dbms_output.put_line('你的選擇是2');
elsif pnum=3 then dbms_output.put_line('你的選擇是3');
elsif pnum=4 then dbms_output.put_line('你的選擇是4');
end if;
end;
舉報
Oracle數(shù)據(jù)庫高級開發(fā)必備的基礎(chǔ),通過實例帶你熟練掌握
2 回答關(guān)于if的語句問題
3 回答大家來找茬,運行報錯!為啥?求指導(dǎo)!
1 回答老師的IF語句第二種情況寫錯了
3 回答fetch語句
2 回答關(guān)于fetch語句的問題?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-05-24
這道題用CASE語句會好一點
2017-05-24
我執(zhí)行可以啊
2017-05-24
set serveroutput on;
declare
pnum number:=#
begin
if pnum=0 then dbms_output.put_line('你的選擇是0');
elsif pnum=5 then dbms_output.put_line('你的選擇是5');
elsif pnum=1 then dbms_output.put_line('你的選擇是1');
elsif pnum=2 then dbms_output.put_line('你的選擇是2');
elsif pnum=3 then dbms_output.put_line('你的選擇是3');
elsif pnum=4 then dbms_output.put_line('你的選擇是4');
end if;
end;