title: How can I select a particular row from a nested table?
body: <p>I have a table that looks like this:</p>
  
  <pre><code> CREATE
       OR
  REPLACE
     TYPE subaccount_nt 
       IS TABLE OF VARCHAR2(30);
  
   CREATE
     TABLE my_table
         ( contract_id   NUMBER(38,0)
         , subaccount    SUBACCOUNT_NT );
  </code></pre>
  
  <p>Here's some sample data:</p>
  
  <pre><code>   100          [1000, 1, 2]
     200          [2000, NULL, 999]
     300          [3000]
  </code></pre>
  
  <p>How can I write a query to return the the third row from the nested table if the 3rd row exists? Here's the output I'm trying to get:</p>
  
  <pre><code>   100          1
     200          NULL
     300          NULL
  </code></pre>
  
  <p>Haeving never worked with nested tables before, I'm finding it quite hard to forumate my query. Thanks.</p>