title: Get the no. of rows returned from sys_refcursor
body: <p>I am writing an Oracle stored procedure with an <code>OUT</code> parameter as <code>SYS_REFCURSOR</code>.</p>
  
  <p>The procedure does something like below:</p>
  
  <ol>
  <li><code>open ref_cursorA for select * from tableA</code></li>
  <li>save the no. of records retrieved to another table.</li>
  <li>return the <code>ref_cursorA</code> for generating an Excel report.</li>
  </ol>
  
  <p>However, there is no way to know the number of rows retrieved before fetching from the cursor, but I really need to save the no. of rows retrieved in the s.p. What should I do in this scenario? </p>