title: bulk collect in oracle
body: <p>How to query bulk collection?  If for example I have</p>
  
  <pre><code>select name 
  bulk collect into namesValues 
  from table1
  </code></pre>
  
  <p>where namesValues is <code>dbms_sql.varchar2_table</code>.</p>
  
  <p>Now, I have another table XYZ which contains</p>
  
  <pre><code> name   is_valid
    v
    h
  </code></pre>
  
  <p>I want to update is_valid to 'Y' if name is in table1 else 'N'.  Table1 has 10 million rows.  After bulk collecting I want to execute</p>
  
  <pre><code>update xyz 
  set is_valid ='Y' 
  where name in namesValue.
  </code></pre>
  
  <p>How to query namesValue? Or is there is another option.  Table1 has no index.
  please help.</p>