PL/SQL Continue Statement
The PL/SQL Continue
statement is used within looping structures to skip the rest of the current loop iteration and continue execution at the condition evaluation and then the beginning of the next iteration.
PL/SQL Continue Statement Syntax
To skip the rest of the current loop iteration and continue execution at the condition evaluation and then the beginning of the next iteration, use the following syntax:
PL/SQL Continue Statement example
The following PL/SQL show how to skip the rest of the current loop iteration and continue execution at the condition evaluation and then the beginning of the next iteration:
Example
DECLARE
counter number(2) := 10;
BEGIN
-- while loop execution
WHILE counter < 20 LOOP
dbms_output.put_line ('value of Counter: ' || counter);
counter := counter + 1;
IF counter = 15 THEN
-- skip the loop using the CONTINUE statement
a := a + 1;
CONTINUE;
END IF;
END LOOP;
END;