IndrekS
2007-12-19 10:28:01 UTC
How can I select 'table name' in select clause if I use UNION ALL?
Example:
select * from table1
union all
select * from table2
union all
select * from table3
Now I want to see the tablename from where I'll get data.
Ex:
select x, * from table1 -- x - funtion/... that gives the table name
(table1)
Example:
select * from table1
union all
select * from table2
union all
select * from table3
Now I want to see the tablename from where I'll get data.
Ex:
select x, * from table1 -- x - funtion/... that gives the table name
(table1)