欢迎投稿

今日深度:

oracle10g不支持continue解决方法

oracle10g不支持continue解决方法


解决方案如下
:采用goto进行跳转

DECLARE
   done  BOOLEAN;
BEGIN
   FOR i IN 1..50 LOOP
      IF done THEN
         GOTO end_loop;
      END IF;
   <>  -- not allowed unless an executable statement follows
   NULL; -- add NULL statement to avoid error
   END LOOP;  -- raises an error without the previous NULL
END;

11g增加continue关键字用法如下

DECLARE
   done  BOOLEAN;
BEGIN
   FOR i IN 1..50 LOOP
      IF done THEN
        continue;
      END IF;
   END LOOP;  
END;

www.htsjk.Com true http://www.htsjk.com/oracle/23636.html NewsArticle oracle10g不支持continue解决方法 解决方案如下 :采用goto进行跳转 DECLARE done BOOLEAN;BEGIN FOR i IN 1..50 LOOP IF done THEN GOTO end_loop; END IF; -- not allowed unless an executable statement follows NULL; -- add NULL s...
评论暂时关闭