title: how to exit the procedure if condition met in a loop PL SQL
body: <p>Let's say I have a for loop</p>
  
  <pre><code>for i in array.first .. array.last loop
   boolean := c(i) &gt; d(i);
   if boolean --is true then
   exit the loop immediately and also exit the entire procedure
  
   else if the boolean is never true til the end of the loop, exit the loop
   and keep running other scripts in this procedure.
  </code></pre>
  
  <p>I know the 'EXIT' keyword needs to be inside of the loop in order to exit the loop if condition is met. And 'RETURN' needs to be outside of the loop, to exit the procedure.</p>
  
  <p>But if I put 'RETURN' outside of the loop, then I think no matter what the result is from the loop, it will exit the entire procedure when the loop ends?</p>