PLS-00376: illegal EXIT statement; it must appear inside a loop
Cause: An EXIT statement was found outside of a loop construct. The EXIT statement is used to exit prematurely from a loop and so must always appear within a loop.
Action: Either remove the EXIT statement or place it inside a loop.