title: How to use a table type in a SELECT FROM statement?
body: <p>This question is more or less the same as <a href="https://stackoverflow.com/questions/1573877/selecting-values-from-oracle-table-variable-array">this</a></p>
  
  <p><em>In the package header :</em><br/>
  Declared the following row type:</p>
  
  <pre><code>  TYPE exch_row IS RECORD(
      currency_cd VARCHAR2(9),
      exch_rt_eur NUMBER,
      exch_rt_usd NUMBER);
  </code></pre>
  
  <p><br/>
  And this table type:</p>
  
  <pre><code>  TYPE exch_tbl IS TABLE OF exch_row INDEX BY BINARY_INTEGER;
  </code></pre>
  
  <p><br/>
  Added a variable:</p>
  
  <pre><code>exch_rt exch_tbl;
  </code></pre>
  
  <p><br/>
  <em>In the package body:</em>
  <br/>
  Fill this table variable with some data.</p>
  
  <p><br/>
  <em>In a procedure in the package body:</em>
  <br/>
  I want to use the following statement:</p>
  
  <pre><code>CURSOR c0 IS
    SELECT i.*, rt.exch_rt_eur, rt.exch_rt_usd
    FROM item i, exch_rt rt
    WHERE i.currency = rt.exchange_cd
  </code></pre>
  
  <p><br/>
  How to do this in Oracle ?</p>
  
  <hr>
  
  <p><strong>Notes</strong></p>
  
  <p>Actually I'm looking for the 'Table Variable' solution in MSSQL:</p>
  
  <pre><code>DECLARE @exch_tbl TABLE
  (
    currency_cd VARCHAR(9),
    exch_rt_eur NUMBER,
    exch_rt_usd NUMBER)
  )
  </code></pre>
  
  <p>And use this Table Variable inside my StoredProcedure.</p>