My Oracle Support Banner

CONTINUE Statement not Completing Loop Correctly when used in a CURSOR FOR LOOP (Doc ID 813858.1)

Last updated on FEBRUARY 12, 2019

Applies to:

PL/SQL - Version 11.1.0.6 to 11.1.0.7 [Release 11.1]
Information in this document applies to any platform.
***Checked for relevance on 23-Sep-2013***

Symptoms

Normally the statement CONTINUE immediately completes the current iteration of a loop and passes control to the next iteration of the loop.  But when it is executed in a CURSOR FOR LOOP and the initialization parameter PLSQL_OPTIMIZE_LEVEL is set to 2 (which is the default setting on 11G), it exits the loop.


The following sample code demonstrates the behavior:

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.