![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Oracle
文章平均质量分 75
词穷墨尽
don't try so hard the best things come when you least expect them to
不定时更新~~
展开
-
PL/SQL 循环 if判断
declare i varchar2(10) := '张三'; begin dbms_output.put_line(i);end;declare i emp.sal%type; begin select sal into i from emp where empno = 7369; dbms_output.put_line(i);end;d...原创 2018-06-21 14:23:27 · 509 阅读 · 0 评论 -
PLSQL游标(含带参数)
declare -- 创建一个游标 cursor emps is select * from emp; -- 声明一个变量记录数据 em emp%rowtype; begin -- 打开游标 open emps; --循环读取数据 loop fetch emps into em; -- 当 游标为空时退出循环 ...原创 2018-06-22 14:31:21 · 2262 阅读 · 0 评论 -
PLSQL异常处理及抛出自定义异常
declare i number; em emp%rowtype; begin -- i:=8/0; -- i='aaaa'; -- select * into em from emp; select * into em from emp where empno=1234567; exception when zero_divid e th...原创 2018-06-22 14:32:25 · 4396 阅读 · 0 评论