啦啦啦啦員工工資合計程式碼
set serveroutput on; declare cursor cdept is select deptno from dept; pdeptno dept.deptno%type; cursor cemp(dno number) is select sal from emp where deptno=dno; psal emp.sal%type; count1 number; count2 number ; count3 number; totalsal number; begin open cdept; loop fetch cdept into pdeptno; exit when cdept%notfound; count1:=0;count2:=0;count3:=0;totalsal:=0; open cemp(pdeptno); loop fetch cemp into psal; exit when cemp%notfound; if psal = 3000 and psal 6000 then count3:=count3+1; end if; totalsal:=totalsal+psal; end loop; insert into test values(pdeptno,count1,count2,count3,totalsal); close cemp; end loop; close cdept; dbms_output.put_line('完成'); commit; end;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/1727/viewspace-2798447/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 冴羽答讀者問:啦啦啦啦啦啦
- Dijkstra 啦啦啦
- noip模擬33[進階啦啦啦]
- ThinkCMFX 1.2 釋出啦,URL美化來啦
- 一刻社群程式碼開源啦
- 阿里秋招啦阿里
- 簡書搬家啦!
- 迅雷前端招聘啦前端
- 我入園啦~~~
- 上新啦KIT
- 上新啦!KIT!
- 圖靈搬家啦!圖靈
- nodejs版本程式碼註釋率統計上新啦~~~NodeJS
- 可啦啦、Moody們融資不斷,國產美瞳蓄勢待發
- TensorFlow 2.0 要來啦!
- 拼多多內推啦
- Linux之父回來啦Linux
- 搬家到雲棲啦
- Mesa 18.2.8釋出啦
- Web前端群招人啦!Web前端
- 開始學習啦
- It的招聘需求來啦
- Kubernetes Grafana看板更新啦!Grafana
- 入駐B站啦
- HMS Core上新啦!
- 公司又又又又要裁員啦!直面天命
- 【完結啦】TDD 構建論壇課程筆記完結啦筆記
- 函式計算工具鏈新成員——FunLocal釋出啦函式
- Grid 佈局發車啦
- 再不用ContraintLayout就out啦AI
- 大轉轉FE招聘啦
- 掌上邑大開源啦!
- 阿里雲私服釋出啦阿里
- 講課 PPT 公開啦
- Create Vite App 支援 OpenTiny 啦?ViteAPP
- Hugging News #0428: HuggingChat 來啦GC
- go-echarts 開源啦GoEcharts
- 我開通部落格啦