title: Oracle/c#: How do i use bind variables with select statements to return multiple records?
body: <p>I have a question regarding Oracle bind variables and select statements.</p>
  
  <p>What I would like to achieve is do a select on a number different values for the primary key.  I would like to pass these values via an array using bind values.</p>
  
  <pre><code>select * from tb_customers where cust_id = :1
  </code></pre>
  
  <p><code>int[] cust_id = { 11, 23, 31, 44 , 51 };</code></p>
  
  <p>I then bind a <code>DataReader</code> to get the values into a table.</p>
  
  <p>The problem is that the resulting table only contains a single record (for <code>cust_id=51</code>). Thus it seems that each statement is executed independently (as it should), but I would like the results to be available as a collective (single table).</p>
  
  <p>A workaround is to create a temporary table, insert all the values of <code>cust_id</code> and then do a join against <code>tb_customers</code>.  The problem with this approach is that I would require temporary tables for every different type of primary key, as I would like to use this against a number of tables (some even have combined primary keys).</p>
  
  <p>Is there anything I am missing?</p>