title: PL/SQL cursor in the while
body: <p>This is what I am trying to achieve:</p>
  
  <ol>
  <li><p>define a cursor </p></li>
  <li><p>which return me list of rows </p></li>
  <li><p>use the rows to do some modify tables</p></li>
  <li><p>repeat 2 and 3 until cursor returns no result.</p></li>
  </ol>
  
  <p>this is what I have done so far</p>
  
  <pre><code>DECLARE
    CURSOR c1 IS
      [My SQL HERE];
  
  BEGIN
  
     FOR r1 in c1 LOOP
     [modify tables]
  
  END; 
  </code></pre>
  
  <p>question is where do I put the while? I would do it before the for loop. but whats the syntax in pl/sql to describe c1 has result?</p>
  
  <p>Note after c1 fullly finish I need to rerun the cursor code. Make another iteration . Because the result will be different. That's why I needed the while</p>