亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Oracle數據庫開發必備利器之PL/SQL基礎

難度初級
時長 3小時22分
學習人數
綜合評分9.57
115人評價 查看評價
9.8 內容實用
9.4 簡潔易懂
9.5 邏輯清晰
老師很帥,支持
講的不錯啊 通俗易懂能學到很多
dbms_output不輸出結果,只提示過程已完成,在開始加一句SET SERVEROUTPUT ON這個就可以了,打開輸出服務
講的太好了,簡潔清晰明了,給100個贊?。。。。?/div>
不用where感覺也對啊
必然必然還是必然
老師講的實在太好了,通俗易懂,思路清晰,太棒了
select a.deptno ,
sum(case when sal<3000 then 1 else 0 end) ,
sum(case when sal<=6000 and sal>=3000 then 1 else 0 end) ,
sum(case when sal>6000 then 1 else 0 end) ,
nvl(sum(sal),0)
from dept a, emp b
where a.deptno = b.deptno(+)
group by a.deptno
order by a.deptno;
declare
cursor cur is select empno,sal from emp order by sal;
pempno emp.empno%type;
psal emp.sal%type;
cnt number :=0;
acc emp.sal%type;
begin
select sum(sal) into acc from emp;
open cur;
loop
exit when acc>50000;
fetch cur into pempno,psal;
exit when cur%notfound;
if acc+psal*0.1<=50000 then
update emp set sal = sal*1.1 where empno=pempno;
cnt := cnt+1;
acc := acc+psal*0.1;
end if;
end loop;
dbms_output.put_line(cnt ||' '||acc);
close cur;
end;
/
如果是在pl/sql developer中編譯的話,只能在sql窗口中:
DECLARE
pnum number:= #
BEGIN
if pnum = 0 then
dbms_output.put_line('數字是0');
elsif pnum = 1 then
dbms_output.put_line('數字是1');
elsif pnum = 2 then
……
請忽略accept命令,不支持。set serveroutput on也不支持。
課程須知
親,要學習本門課程只需要熟練使用Oracle的SQL語句就可以了,可以參考慕課網的課程《Oracle數據庫開發必備利器之SQL基礎》呦!
老師告訴你能學到什么?
1、能夠熟練掌握PL/SQL的基本語法 2、能夠熟練使用光標和例外 3、能夠熟練使用PL/SQL進行開發

微信掃碼,參與3人拼團

微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網的支持!

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消