比如联合查询3个表,表名分别叫a,b,c
select 'a' tbname,a.* from a
union all
select 'b' tbname,b.* from b
union all
select 'c' tbname,c.* from c
比如联合查询3个表,表名分别叫a,b,c
select 'a' tbname,a.* from a
union all
select 'b' tbname,b.* from b
union all
select 'c' tbname,c.* from c