Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use continue in loop ...

700402Jun 19 2009 — edited Jun 25 2009
Hi,
declare 
i number;
begin   
i:=0;
loop     
dbms_output.put_line('i='||to_char(i));     
if ( i = 2 )  then        
continue;      
end if;     
dbms_output.put_line(' Only if i is not equal to 2 ');   
end loop; 
end; 
When I run this block, oracle is throwing an error...
ORA-06550: line 8, column 1:
PLS-00201: identifier 'CONTINUE' must be declared
ORA-06550: line 8, column 1:
PL/SQL: Statement ignored
This feature has been added in Oracle 11, but I am using Oracle 10.2.0.1
Is there any other keyword like "CONTINUE" in 10g?

Please help me.

Thanks,
Bharath.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2009
Added on Jun 19 2009
7 comments
952 views