I have a sql table which has five columns
- Count1 float
- Count2 float
- Total float
- Positive float
- Negative float
When I insert data in Count1 and Count2, Total should be automatically populated with the total of count1 + count 2 and positive column should represent how many values are positive in that row and negative column should represent how many values are negative in that row.
Im using sql server 2008.
How should I add a function to the 3 columns to compute the data when I insert values in column 1 and column 2.
Could someone please provide a code snippet on how to do this.
Thanks.