Вот пример «Причудливого обновления»
use tempdb
go
drop table if exists t
go
create table t(id int primary key, Amount int, RunningTotal int)
insert into t(id,Amount,RunningTotal) values (1,4,0),(2,2,0),(3,6,0)
declare @t int = 0
update t set @t = RunningTotal = @t + Amount
select * from t
output
id Amount RunningTotal
----------- ----------- ------------
1 4 4
2 2 6
3 6 12