需求:mysql统计多张表中的总数
因为需求不明确,答案有三种:
答案1:
select sum(a) from (select count(*) a from tb1 union select count(*) a from tb2 union select count(*) a from tb3) as tb;select sum(a) f
需求:mysql统计多张表中的总数
因为需求不明确,答案有三种:
答案1:
select sum(a) from (select count(*) a from tb1 union select count(*) a from tb2 union select count(*) a from tb3) as tb;select sum(a) f