title: Include table name in SQL query
body: <p>What I need to do is get a table name in result from a union query with 4 selects from different tables. I need to get the id and the table name for further processing.</p>
  
  <p>For example i have table1, table2, table3 table4 and have a query:<br></p>
  
  <pre><code>SELECT id from table1,blablabla
  UNION
  SELECT id from table2,blablabla
  UNION
  SELECT id from table3,blablabla
  UNION
  SELECT id from table4,blablabla
  </code></pre>
  
  <p>And I need the result like:</p>
  
  <pre><code>1, blablabla, table1
  4, blablabla, table4
  7, blablabla, table2
  </code></pre>