title: Writing a stored function to return an array of rowid
body: <p>I am trying to write a stored function to return an array of <code>rowid</code>. The first thing I do is to create the <code>TABLE</code> type for <code>rowid</code> by:</p>
  
  <pre><code>CREATE OR REPLACE TYPE T_ROWID_ARRAY IS TABLE OF ROWID;
  </code></pre>
  
  <p>However, the following error message is shown:</p>
  
  <pre><code>PLS-00531: Unsupported type in a VARRAY or TABLE type: 'ROWID'.
  </code></pre>
  
  <p>After some googling, it looks like that Oracle 11gR2 does not allow to create a <code>table</code> type of <code>rowid</code>. </p>
  
  <p>So is there any workaround so that I can write a stored function to return multiple rowid(s)?</p>
  
  <p>I hope to simplify my SQL by writing like below:</p>
  
  <pre><code>SELECT * FROM TABLE_A WHERE ROWID IN (SELECT COLUMN_VALUE FROM GET_ROW_IDS('A', 'B', 'C'));
  </code></pre>