March 25th, 2011, 09:37 PM
Join Date: Mar 2011
Location: Dunwoody, GA
Time spent in forums: 1 h 49 m 6 sec
Reputation Power: 0
Originally Posted by syedejaz
I am new to SQL server. I have university project. I dont have good idea in SQL.
I have a table EmployeeSalary.
I have the following columns:
I want a function which should store all the values of the columns [BassicSalary] ,[Housing] ,[Bonus]
,[Commision] in a column [NetSalary]
It should be like that
[NetSalary] = [BassicSalary]+[Housing]+[Bonus]+[Commision]
Kindly tell me how can I do it in SQL SERVER 2008.
Tell me a little more. Are you looking for the syntax needed to update the NetSalary column, or are you looking for how to write an insert/update trigger to automatically update the NetSalary column when any of the other columns change?