更新汇总行

update table1 set column1 = table2.column1,column2 = table2.column2

from

(

select sum(column1),sum(column2) from table1 where 1 = 1

)as table2

where 2 = 2

原文地址:https://www.cnblogs.com/roboot/p/7928019.html