Can you just do
SELECT t1.*, "t1" as tablename FROM t1
UNION
SELECT t2.*, "t2" as tablename FROM t2
Roger
-Original Message-
From: Miguel Vaz [mailto:[EMAIL PROTECTED]
Sent: 17 February 2008 00:04
To: mysql@lists.mysql.com
Subject: select with table name
At 12:04 AM + 2/17/08, Miguel Vaz wrote:
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
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 lis