goto不可以,使用loop 结合exit和when相结合,例子如下:loop
   
  ---your code here
  exit when 退出条件;  ---your code here   
end loop;

解决方案 »

  1.   

    exit when 就退出整个循环了,我只想退出本次循环,即下面的代码不执行,而跳到for loop开始处执行,怎么解决
      

  2.   

    可以,写错了,给你个例子:create or replace procedure dd is
      i pls_integer;
    begin    
      i:=0;
      loop
        <<top>>
        
        i:=i+1;
        if i>10 then 
          exit;
        end if;
        
        if i>5 then      
          goto top;
        end if;    
        
        dbms_output.put_line(i);   
      end loop;
    end;