title: How to query multiple SQL tables with the same table schema?
body: <p>I have below list of tables which is created based on weekly archive.</p>
  
  <pre><code>dbtable
  dbtable_01_04_2017
  dbtable_01_07_2017
  dbtable_02_09_2017
  dbtable_03_06_2017
  dbtable_05_08_2017
  dbtable_06_05_2017
  dbtable_08_04_2017
  dbtable_08_07_2017
  dbtable_09_09_2017
  dbtable_10_06_2017
  dbtable_12_08_2017
  dbtable_13_05_2017
  dbtable_15_04_2017
  dbtable_15_07_2017
  dbtable_17_06_2017
  dbtable_19_08_2017
  dbtable_20_05_2017
  dbtable_22_04_2017
  dbtable_22_07_2017
  dbtable_24_06_2017
  dbtable_26_08_2017
  dbtable_27_05_2017
  dbtable_29_04_2017
  dbtable_29_07_2017
  </code></pre>
  
  <p>All of them has the exact same column structure:</p>
  
  <p>TIME_STAMP, USERNAME, INFO, CAUSE</p>
  
  <p>I need to query all of them at once using the same query, of course only by changing the table name in below example query.</p>
  
  <pre><code> SELECT * FROM dbtable WHERE USERNAME="XXXX";
  </code></pre>
  
  <p>I googled a bit hoping that there is a way to wildcard the name in the query but I learned that SQL doesn't support that. </p>
  
  <p>Basically, I am looking for some kind of for loop to iterate the query to multiple tables.</p>
  
  <p>Please note that new tables will be added each week based on our archive automation.</p>