title: Mysql union from multiple database tables
body: <p>I have a group of databases which have a table with <strong>same schema</strong>. So, i am doing a <code>UNION</code> on this table to show the records from all databases, which works nice.</p>
  
  <p>But, now i have to detect which row belongs to which database/table, as i need to modify that particular record. I found <a href="https://stackoverflow.com/questions/409705/mysql-selecting-data-from-multiple-tables-all-with-same-structure-but-differen">this</a> link on getting the <code>UNION</code>, but am unable to find the logic which determines row&lt;->table relationship.</p>