title: Anonymous TABLE or VARRAY type in Oracle
body: <p>In Oracle, I would sometimes like to create constructs such as these ones</p>
  
  <pre><code>SELECT * FROM TABLE(STRINGS('a', 'b', 'c'))
  SELECT * FROM TABLE(NUMBERS(1, 2, 3))
  </code></pre>
  
  <p>Obviously, I can declare my own types for the above. I can choose between <code>TABLE</code> and <code>VARRAY</code>. For example:</p>
  
  <pre><code>CREATE TYPE STRINGS AS TABLE OF VARCHAR2(100);
  CREATE TYPE NUMBERS AS VARRAY(100) OF NUMBER(10);
  </code></pre>
  
  <p>In this particular case, another solution is to write things like</p>
  
  <pre><code>SELECT 'a' FROM DUAL UNION ALL
  SELECT 'b' FROM DUAL UNION ALL
  SELECT 'c' FROM DUAL
  </code></pre>
  
  <p>But I may have more complex examples where I will really need a <code>TABLE</code> / <code>VARRAY</code> type. So what if my SQL is running on an unknown system where I cannot create types because I may not have the necessary grants?</p>
  
  <p><strong>So my question is:</strong> Does Oracle know "anonymous" <code>TABLE</code> / <code>VARRAY</code> types that are available on any Oracle instance? Similar to Postgres / H2 / HSQLDB's simple <code>ARRAY</code> types?</p>
  
  <p><strong>UPDATE</strong>: I am mostly running this SQL from Java, if this is relevant. No need to explain PL/SQL to me, I'm really just looking for anonymous SQL array types (i.e. "anonymous" <em>standalone stored types</em>). If they don't exist at all, the answer is <em>NO</em></p>