1. 程式人生 > >oracle 巢狀迴圈跳出內部迴圈體

oracle 巢狀迴圈跳出內部迴圈體

  PROCEDURE test(P_MSG out VARCHAR2) is
  begin
    <<illoop>>
    for i in 1 .. 10 loop
      <<jloop>>
      for j in 1 .. 5 loop
        dbms_output.put_line('i:' || i || ' j :' || j);
        EXIT jloop when j = 3;
      end loop jloop;
    end loop illoop;
  end;