Oracle Error PLS-00374: illegal EXIT/CONTINUE statement; must appear inside the loop labeled ‘string’

Oracle Error Message

PLS-00374: illegal EXIT/CONTINUE statement; must appear inside the loop labeled ‘string’

Reason for the Error

The label in the EXIT or CONTINUE statement did not refer to a loop statement. An EXIT or CONTINUE statement need not specify a label. However, if a label is specified (as in EXIT my_label or CONTINUE my_label), the EXIT or CONTINUE statement must be inside the LOOP statement designated by that label.

Solution

Make sure the label name is spelled correctly; if necessary, move the EXIT or CONTINUE statement inside the LOOP statement to which the label refers.