SQL中sum函数问题

2025-02-24 21:03:40
推荐回答(1个)
回答1:

1
2
3
4
select count1+count2
from
(select count(*) count1 from one) a,
(select count(*) count2 from two) b

1
2
3
4
5
select sum(a.count1)
from
(select count(*) count1 from one
union all
(select count(*) from two) a