11g新增continue语句.
时间:2010-10-19 来源:TOMSYAN
刚开始学ORACLE的时候,用continue就不行,后来知道oracle里没有continue。
一直不理解ORACLE为什么没有加入continue原因。11G之后,ORACLE终于引入了continue.
SQL> declare
2 total int:=0;
3 begin
4 for i in 1..10 loop
5 if mod(i,2)=0 then
6 continue;
7 end if;
8 total:=total+i;
9 end loop;
10 dbms_output.put_line(total);
11 end;
12 /
25
PL/SQL procedure successfully completed.
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production