If I have a simple union
select name, phone from users union select name, phone from vendors;
Is there a way to add the table name to the results?
So instead of
+--------+-------+
| name | phone |
+--------+-------+
| Jim | 123...|
| Macy's | 345...|
+--------+-------+
I'd get
+--------+-------+---------+
| name | phone | table |
+--------+-------+---------+
| Jim | 123...| users |
| Macy's | 345...| vendors |
+--------+-------+---------+