Easy:
SELECT
Val1,
Val2,
Val3,
(Val1 + Val2 + Val3) as 'Total'
FROM Emp
or if you just want one row:
SELECT
SUM(Val1) as 'Val1',
SUM(Val2) as 'Val2',
SUM(Val3) as 'Val3',
(SUM(Val1) + SUM(Val2) + SUM(Val3)) as 'Total'
FROM Emp
More Related Contents:
- Simulating group_concat MySQL function in Microsoft SQL Server 2005?
- How can I do an UPDATE statement with JOIN in SQL Server?
- The multi-part identifier could not be bound
- How to return multiple values in one column (T-SQL)?
- Fastest way to update 120 Million records
- Can a Check constraint relate to another table?
- Is it possible to select sql server data using column ordinal position
- How to find current transaction level?
- How to insert multiple records and get the identity value?
- How to Replace Multiple Characters in SQL?
- How can a LEFT OUTER JOIN return more records than exist in the left table?
- EXISTS vs JOIN and use of EXISTS clause
- “select * from table” vs “select colA, colB, etc. from table” interesting behaviour in SQL Server 2005
- Dynamic SQL to generate column names?
- SQL comma-separated row with Group By clause
- How to copy a huge table data into another table in SQL Server
- Column name or number of supplied values does not match table definition
- How to split string using delimiter char using T-SQL?
- SQL Server PIVOT perhaps?
- How to find consecutive rows based on the value of a column?
- Should I use SQL_Variant data type?
- SQL server select distinct rows using most recent value only
- Measuring Query Performance : “Execution Plan Query Cost” vs “Time Taken”
- How to escape square brackets inside square brackets for field name
- What is the internal representation of datetime in sql server?
- Eliminate and reduce overlapping date ranges
- SQL Server 2005 – Export table programmatically (run a .sql file to rebuild it)
- SQL Sort Order with Null values last
- Insert all values of a table into another table in SQL
- When to use EXCEPT as opposed to NOT EXISTS in Transact SQL?