天天看点

union all查询统计总数量

select sum(a.b) as num from (

select count() as b from table_1 

union all 

select count() as b from table_2

) as a(注意这里要取个别名)

本文转自 Lee_吉  博客,原文链接:     http://blog.51cto.com/12173069/2053757   如需转载请自行联系原作者

继续阅读