如果我有一个简单的工会
select name, phone from users union select name, phone from vendors;
有没有办法将表名添加到结果中?
所以而不是
+--------+-------+
| name | phone |
+--------+-------+
| Jim | 123...|
| Macy's | 345...|
+--------+-------+
我会得到
+--------+-------+---------+
| name | phone | table |
+--------+-------+---------+
| Jim | 123...| users |
| Macy's | 345...| vendors |
+--------+-------+---------+