日期:2014-05-17 浏览次数:20543 次
select b,count(1) from (select * from a union all select * from b Union all select * from c . . . union all select * from t) T group by b
------解决方案--------------------
select b,count(*) from
(
select * from 表1
union all
select * from 表2
Union all
select * from 表3
.
.
.
union all
select * from 表20
) tb
group by b