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(注意这里要取个别名)
mysql使用 union all查询统计总数量
最新推荐文章于 2023-04-07 16:23:01 发布
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(注意这里要取个别名)