Se stai usando MSSQL2012
o superiore puoi usare OVER
clausola.
SELECT t2.id, t2.value, SUM(t2.value) OVER (ORDER BY t2.id) as [Result]
FROM Test01 t2
ORDER BY t2.id;
Se stai usando MSSQL2012
o superiore puoi usare OVER
clausola.
SELECT t2.id, t2.value, SUM(t2.value) OVER (ORDER BY t2.id) as [Result]
FROM Test01 t2
ORDER BY t2.id;