I have a table Emp which has these rows:
Emp
Emp_cd | Val1 | Val2 | Val3 | Total -------+-------+-------+-------+------- 1 | 1.23 | 2.23 |
Another example using COALESCE. http://sqlmag.com/t-sql/coalesce-vs-isnull
SELECT (COALESCE(SUM(val1),0) + COALESCE(SUM(val2), 0) + COALESCE(SUM(val3), 0) + COALESCE(SUM(val4), 0)) AS 'TOTAL' FROM Emp