PL/SQL Best Practices [17][Iterative Processing]-Unstructured Exits
Avoid Unstructured Exits from Loops
Do not EXIT or RETURN out of a FOR loop.
* A FOR loop should only be used when you want to execute the body a fixed number of times.
* Stay for the duration or use a different loop construct.
* Note: If an exception is raised and the loop stops, that is a legitimate “early termination.”
Do not use the EXIT syntax in a WHILE loop.
* The loop should be terminated only when the condition in the boundary evaluates to FALSE.
Do not EXIT or RETURN out of a FOR loop.
* A FOR loop should only be used when you want to execute the body a fixed number of times.
* Stay for the duration or use a different loop construct.
* Note: If an exception is raised and the loop stops, that is a legitimate “early termination.”
Do not use the EXIT syntax in a WHILE loop.
* The loop should be terminated only when the condition in the boundary evaluates to FALSE.

浙公网安备 33010602011771号