title: PL SQL: How to populate a cursor in loop
body: <p>I have a scenario to implement where in we will have an SP with two parameters 
  1) In parameter of array of Varchar2
  2) Cursor -- Out parameter </p>
  
  <p>We have populate the cursor only for each Value passed in array and this opened/populated cursor will be used by Java. But what i have found till now is, if we have to process an array then it should have to be done using loop.</p>
  
  <p>For ex:</p>
  
  <pre><code>Open Cursor_Name
  For 
  For index In Arrar_Parameter.FIRST .. Arrar_Parameter.LAST
  LOOP
      SELECT * FROM EMP WHERE EmpId = Arrar_Parameter[i] -------&gt; This needs to be looped and not sure if this will work
  END LOOP
  </code></pre>
  
  <p>Can we have some thing like this</p>
  
  <pre><code>Open Cursor_Name
  For 
  SELECT * FROM EMP WHERE EmpId IN (Arrar_Parameter values) ------&gt; To fetch/put all the array values at once without loop.
  </code></pre>
  
  <p>Kindly suggest hot to populate cursor in this scenario</p>