怎样将select sum(price1) from a
select sum(price2) from b1.将两查询汇总值加在一起显示出来.
2.将两查询汇总值为字段 price1 price2
值 150 100
select sum(price2) from b1.将两查询汇总值加在一起显示出来.
2.将两查询汇总值为字段 price1 price2
值 150 100
From
(
select sum(price1)as price from a
Union
select sum(price2)as price from b
) T
select 字段,price1,price2
from
(select 字段,price1=sum(price1) from a group by 字段) a inner join
(select 字段,price2=sum(price2) from b group by 字段) b on a.字段=b.字段
select '值' 字段,Price1,Price2,(Price1+Price2) as SumPrice
from
(select (selec sum(price1) from a) Price1,(selec sum(price2) from b) Price2)