Oracle存储过程异常处理继续下次循环

编程

1、捕捉异常后继续下一次循环需用

     EXCEPTION
     when others then  null;

    这样的结构。

2、在for ...LOOP   ENDLOOP 循环中捕捉异常,必须用begin   end 包起来,否则会报错。在PLSQL中报

    PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following 
    Error: PLS-00103: Encountered the symbol "END" when expecting one of the following

  正确


    FOR E IN TP LOOP
    begin
      ......................
     EXCEPTION
     when others then  null;

   end;

   endloop;

以上是 Oracle存储过程异常处理继续下次循环 的全部内容, 来源链接: utcz.com/z/511450.html

回到顶部