declare
begin
  for CUR in (select LEVEL A from dual  connect by level<=10) loop
    declare
      my_exscep EXCEPTION;
    BEGIN
      IF (CUR.A = 5 OR CUR.A=7) THEN
        RAISE my_exscep;
      ELSE
         dbms_output.put_line(CUR.A);
      END IF;
    EXCEPTION
      WHEN my_exscep THEN
        dbms_output.put_line('dont update now!!');
    END;
  END LOOP;
END;

 

第二種:

    

for ... loop
...
if somecondition then
   goto nextloop;
end if;
...

<<nextloop>>
   null;
end loop;

 

相关文章:

  • 2022-01-07
  • 2021-12-31
  • 2022-02-27
  • 2022-03-03
  • 2021-05-29
  • 2022-01-14
猜你喜欢
  • 2021-06-08
  • 2022-02-03
  • 2022-12-23
  • 2022-03-09
  • 2021-09-05
  • 2021-07-11
  • 2021-09-21
相关资源
相似解决方案