sql使用union all进行多张表相同字段求和
select sum(f1) fa from ( select sum(f2) fb from t1 union all select sum(f3) fc from t2 )
两个表t1和t2得 f2 , f3,同一个意义,可以一起sum,通过 union all 合并两个表得数据
select sum(f1) fa from ( select sum(f2) fb from t1 union all select sum(f3) fc from t2 )
两个表t1和t2得 f2 , f3,同一个意义,可以一起sum,通过 union all 合并两个表得数据