title: Oracle PL/SQL return array of rows
body: <p>Dear Oracle Developers,</p>
  
  <p>I have searched and googled to find a solution for my problem but nothing helped me.</p>
  
  <p>Situation :</p>
  
  <p>TABLE : CUSTOMER(....);</p>
  
  <p>My problem is : I want to create a stored procedure say <code>get_customers</code> to return an array of customer rows. I have no idea how to get this working.</p>
  
  <p>I tried to create a type customer_rec and using a cursor to retrieve no more than maxRows</p>
  
  <pre><code>create or replace procedure get_customers(maxRows IN NUMBER, ??? OUT ????)
  </code></pre>
  
  <p>How to define the OUT parameter ?</p>
  
  <p>How to retrieve the rows in the array using a cursor ?</p>
  
  <p>Thanks a lot</p>