Hi,
I have a small issue that i can get my head around to solve:
Is it possible to do a select from two tables using a union all
(select * from t1 union all select * from t2), and have it display
the table name in front of each row?
What i need is, on the big resulting list, to know from which table
the row came from.
Example:
Table: t1
-----------------------
id name
-----------------------
1 john
2 mary
Table: t2
-----------------------
id name
-----------------------
1 paul
2 peter
I need these results:
----------------------------------------
id name fromtable
----------------------------------------
1 john t1
2 mary t1
3 paul t2
4 peter t2
Is this possible? If so, how?
Thanks!
Pag
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]