异常处理、集合、游标和存储过程(第2天) .pdfVIP

  • 1
  • 0
  • 约4.12万字
  • 约 31页
  • 2026-05-07 发布于河北
  • 举报

异常处理、集合、游标和存储过程(第2天) .pdf

第5章异常处理

5.1异常处理

Java当中的异常,没有学,略过即可.

5.1.1Java当中的异常

try(

}catch(NulIPointxceptione){

}catch(ArithMaticxceptione)(

}cntch(xceptione){

5.1.2PL/SQL的异常

declare

begin

exception

when异常名字1then语句1

when异常名字2or异常名字3then沿句2

whenothersthe语句3

end;

5.1.3捕获的异常必须是运行时异常

declare

一声明变量部分的错误不会被处理

v_empnoe«ps.empno%type:一很明显emps表不存在

begin

一只有在运行时的错误才会被处理

selectempnointov_empnofromempwhereempnon88;--这个时候发现Yempno类畿有问遂

exception

一处理不了他错误会向外传递

end;

5.L4异常分类

oracle内部定义的异常

内部定义的异常时在系统运行时候自动产生的,这种异常时

文档评论(0)

1亿VIP精品文档

相关文档