title: How to use record to loop a ref cursor?
body: <p>I want to write PL/SQL to test a function in a package.  The package defines a cursor type</p>
  
  <pre><code>TYPE ref_cursor IS REF CURSOR;
  </code></pre>
  
  <p>I want to define a record based on that type.</p>
  
  <p>My code is:</p>
  
  <pre><code>DECLARE
    cur PACKAGE_NAME.ref_cursor; 
    rec cur%ROWTYPE;
  </code></pre>
  
  <p>why is last line not correct?</p>