I have a table Emp which has these rows:
Emp
Emp_cd | Val1 | Val2 | Val3 | Total -------+-------+-------+-------+------- 1 | 1.23 | 2.23 |
You must also be aware of null records:
null
SELECT (ISNULL(Val1,0) + ISNULL(Val2,0) + ISNULL(Val3,0)) as 'Total' FROM Emp
Usage of ISNULL:
ISNULL
ISNULL(col_Name, replace value)