 <pre><code>SELECT *, 'table_1' as tablename FROM table_1 WHERE text ='Hello' union all SELECT *, 'table_2' as tablename FROM table_2 WHERE text ='Hello' union all SELECT *, 'table_3' as tablename FROM table_3 WHERE text ='Hello' </code></pre>