Is it possible to sum up values in mysql as in excel? I´m currently trying query below but it sums up the values on another rows. I need something that wil be working like sum function in excel and if I add some values into the table, the values will summed in the column (spolu) automatically.
INSERT INTO test (spolu)
SELECT SUM(hodnota1+hodnota2)
FROM test
GROUP BY id
This query do this:
but i need this:


UPDATE test SET spolu = hodnota1 + hodnota2should work for you.