EXIT Statement in PL/SQL
The EXIT statement forces a loop to complete unconditionally. When an EXIT statement is encountered, the loop completes immediately and control passes to the next statement.
An Example follows:
LOOP
IF emp_rating < 3 THEN
–Some executable statements
EXIT; — exit loop immediately
END IF;
END LOOP;
– control resumes here
Remember, the EXIT statement must be placed inside a loop. To complete a
PL/SQL block before its normal end is reached, you can use the RETURN statement.
Read more about RETURN statement in PL SQL