title: How to close a returning cursor in PL/SQL?
body: <p>I am new to PL/SQL and I just got to cursors in my learning process. I've been seeing stored procedure parameters with type <code>OUT SYS_REFCURSOR</code> which, as far as I understand, its purpose is to 'return data' just like a pointer in C language. I been wondering who is going to close such <code>SYS_REFCURSOR</code> parameter if the procedure has to open it and can't close it? (If the procedure closes the out <code>OUT SYS_REFCURSOR</code> then there will not be any data to return).</p>
  
  <p>Also, I think, it is bad design to rely on external functions other than the stored procedure that contains <code>OUT SYS_REFCURSOR</code> parameter to close the cursor. Is there a way I can return a table from a stored procedure without using cursors?</p>