title: Append the output of Oracle PL/SQL block Loop into one table
body: <p>I have a very beginner knowledge on SQL and trying to get this work for a couple days but no luck unfortunately.</p>
  
  <p>I have a PL/SQL block code like this..</p>
  
  <pre><code>BEGIN
  For i in (SELECT 'SELECT * FROM ' || ACTIVE_POD || '.userservice' AS QUERY
  FROM active_tables) loop
  dbms_output.put_line(i.query);
  end loop;
  END;
  </code></pre>
  
  <p>This will output </p>
  
  <pre><code>SELECT * FROM DB1.userservice
  SELECT * FROM DB2.userservice
  ....
  SELECT * FROM DB99.userservice
  </code></pre>
  
  <p>What I want to get is union of all above query outputs into one table. For example) Let's say the union of above output will be three integer columns </p>
  
  <pre><code>    ID |item_code|type
      10 | 2       |1001
      91 | 2       |1005
      10 | 2       |1011
  </code></pre>
  
  <p>I would appreciate any guidance on this. thank you!</p>