How to find sum of multiple columns in a table in SQL Server 2005

0 votes

I have a table Emp which has these rows:

Emp_cd | Val1  | Val2  | Val3  | Total
-------+-------+-------+-------+-------
 1     | 1.23  | 2.23  | 3.43  | 
 2     | 23.03 | 12.23 | 2.92  |
 3     | 7.23  | 9.05  | 13.43 |
 4     | 03.21 | 78.23 | 9.43  |

I want to find SUM of Val1, Val2, Val3 and which will show in the Total column. Can someone please help me with this?

Aug 19, 2022 in Database by Kithuzzz
• 38,010 points
1,325 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Database

0 votes
0 answers

How to DROP multiple columns with a single ALTER TABLE statement in SQL Server?

In one ALTER TABLE statement, I would ...READ MORE

Sep 2, 2022 in Database by Kithuzzz
• 38,010 points
476 views
0 votes
0 answers

How to ALTER multiple columns at once in SQL Server

ALTER the data types of several columns in ...READ MORE

Aug 12, 2022 in Database by Kithuzzz
• 38,010 points
2,153 views
0 votes
0 answers

How to select the last record of a table in SQL?

Here is an example of code that ...READ MORE

Aug 23, 2022 in Database by Kithuzzz
• 38,010 points
807 views
0 votes
0 answers

How to create a table from select query result in SQL Server 2008

I tried to build a table from ...READ MORE

Sep 2, 2022 in Database by Kithuzzz
• 38,010 points
593 views
0 votes
0 answers

How to rename a table in SQL Server?

The SQL query that I have used is : ALTER ...READ MORE

Sep 5, 2022 in Database by Kithuzzz
• 38,010 points
554 views
0 votes
2 answers

How to select the nth row in a SQL database table?

SELECT * FROM ( SELECT ID, NAME, ROW_NUMBER() ...READ MORE

answered Apr 23, 2020 in Database by anand
• 140 points
24,788 views
0 votes
1 answer

SQL Server CASE .. WHEN .. IN statement

Two forms of CASE statements are getting ...READ MORE

answered Feb 8, 2022 in Database by Vaani
• 7,020 points
459 views
0 votes
0 answers

Selecting COUNT(*) with DISTINCT

In SQL Server 2005, I have a ...READ MORE

Feb 14, 2022 in Database by Neha
• 9,060 points
293 views
0 votes
1 answer

SQL Server CASE .. WHEN .. IN statement

Try this... SELECT AlarmEventTransactionTableTable.TxnID, ...READ MORE

answered Jun 14, 2022 in Others by polo
• 1,480 points
339 views
0 votes
0 answers

Simple DateTime sql query

How do I query the DateTime database ...READ MORE

Aug 12, 2022 in Database by Kithuzzz
• 38,010 points
402 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP