'CONTINUE' keyword in Oracle 10g PL/SQL

后端 未结 9 2185
失恋的感觉
失恋的感觉 2020-12-14 06:00

I\'m migrating a TSQL stored procedure to PL/SQL and have encountered a problem - the lack of a CONTINUE keyword in Oracle 10g.

I\'ve read that Oracle 11g has this a

9条回答
  •  生来不讨喜
    2020-12-14 06:42

    In fact, PL SQL does have something to replace CONTINUE. All you have to do is to add a label (a name) to the loop :

    declare
       i integer;
    begin
       i := 0;
    
       <>loop
    
          i := i + 1;
          if i <= 3 then goto My_Small_Loop; end if; -- => means continue
    
          exit;
    
       end loop;
    end;
    

提交回复
热议问题