存储过程,多个表的SUM列值

时间:2019-02-13 12:49:02

标签: sum procedure

过程需要给出所有总和值的总和。你能帮我吗?

create proc test
as
begin
select (1)SUM(Column1) from table1
select (2)SUM(Column1) from table2
select (3)SUM(Column1) from table3
select (4)SUM(Column1) from table4
select (5)SUM(Column1) from table5
return 1+2+3+4+5?
end

0 个答案:

没有答案