
plsql编程
iteye_18341
这个作者很懒,什么都没留下…
展开
-
plsqld的学习
declare --声明变量begin --开始dbms_output.put_line('hello world'); --程序块end; --结束 --plsql变量的声明 declare myName char; age number(8,2); married ...原创 2014-06-27 22:46:25 · 178 阅读 · 0 评论 -
plsql的例外
--plsql异常的处理declare pnum number; begin pnum:=1/0; exception when Zero_Divide then dbms_output.put_line('0不能被除。。。。。。。。。。。。。'); dbms_output.put_line('0不能被除...原创 2014-06-28 13:32:54 · 124 阅读 · 0 评论 -
plsql自定义例外
--自定义例外declare cursor p_scursor is select ename from emp where empno=50; p_ename emp.ename%type; --定义自定义的例外 no_empname_found exception;begin open p_scursor; fetch p_scu...原创 2014-06-28 13:49:10 · 186 阅读 · 0 评论 -
plsql实现统计员工入职年份人数
--统计公司员工入职年份的员工数 declare cursor p_cursor is select to_char(hiredate,'YYYY' ) from emp; p_hiredate char(10); count80 number:=0; count81 number:=0; count87 number:=0;...原创 2014-06-28 14:26:08 · 1808 阅读 · 0 评论 -
为员工长工资。从最低工资调起每人长10%,但工资总额不能超过5万元,
/*为员工长工资。从最低工资调起每人长10%,但工资总额不能超过5万元,请计算长工资的人数和长工资后的工资总额,并输出输出长工资人数及工资总额。可能的SQL:员工: select empno,sal from emp order by sal;长工资后的工资总额:1. 对sal进行累加: 新的工资总额=旧的工资 + sal*0.1; 2....原创 2014-06-29 11:41:07 · 962 阅读 · 0 评论