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

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

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

難度初級
時長 3小時22分
學習人數
綜合評分9.57
115人評價 查看評價
9.8 內容實用
9.4 簡潔易懂
9.5 邏輯清晰
老師講的實在太好了,通俗易懂,思路清晰,太棒了
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;
/

已采納回答 / 昕牌肉貓
自己的親身經歷:win10 64bit,裝了11.2g的Oracle 64bit,無論怎么調(下載64bit的SQL developer也沒用),都無法調通SQL developer,感覺是32與64之間的兼容問題。win7 32bit,裝了11.2g的Oracle 32bit,很輕松就用上了SQL developer(注意要選一下java的位置,在Oracle目錄里的一個jdk的文件夾里面找)。我使用PL/SQL developer客戶端學習的這門課程,除了一些命令不能用(如accept、servero...
如果是在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也不支持。

已采納回答 / qq_aiq_2
if pjob='PRESIDENT' then update sal=sal+1000; 后面不加where 約束 會刷新表中所有數據,前面的if條件 與后面執行語句沒關系的
換成html5播放,可以加快語速,節省時間有能集中精神聽,感覺學習效率更好!
set serveroutput on
accept num prompt '請輸入數字';
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 dbms_output.put_line('輸入了2');
else dbms_output.put_line('輸入了其他數字');
end if;
end;
/
不錯不錯,淺顯易懂哈哈

最新回答 / 蒲公英0910
group by后面要加變量名,會造成每個值的數量統計,而不能按照變量值區間分段統計

最新回答 / 慕妹5780192
我的SQLdevelop 根本就無法連接,沒法用
課程須知
親,要學習本門課程只需要熟練使用Oracle的SQL語句就可以了,可以參考慕課網的課程《Oracle數據庫開發必備利器之SQL基礎》呦!
老師告訴你能學到什么?
1、能夠熟練掌握PL/SQL的基本語法 2、能夠熟練使用光標和例外 3、能夠熟練使用PL/SQL進行開發

微信掃碼,參與3人拼團

微信客服

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

幫助反饋 APP下載

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

公眾號

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

友情提示:

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

本次提問將花費2個積分

你的積分不足,無法發表

為什么扣積分?

本次提問將花費2個積分

繼續發表請點擊 "確定"

為什么扣積分?

舉報

0/150
提交
取消