I believe you need to use this query,
SELECT ([Basic Salary] + HRA + [TA&DA]) AS 'Total'
WHERE Employee_ID = @SalID;
Application of an aggregate function (
in this case) makes little sense, why would you spread the
of an employee all over the table, and then group
it? If you wanted to get a grouping of the values, then maybe
part makes sense, but
query is inappropriate for a group as you might want to apply something like,
WHERE Basic Salary > 1000
Secondly, please name the tables in a better way—TA_DA would make more sense. Similar for Basic_Salary, avoid spacing, and special characters/names. You might know what you did, but the other DBA(s) would always be up for a challenge to break things. :-)
Check out this thread
] to learn about other ways in which you can get the sum of columns for a record.