SQLTeam.com | Weblogs | Forums

How to output only sum of a column


I have the query SELECT ItemName, Value FROM Table1 and outputs this.

ItemName  Value
A	  4
B	  6
C	  15

I like to run another query to use the above table and give me the total for Value column (4+6+15 = 25)
The new query should generate the following output.


Any help would be appreciated.

Try this:

select sum([value]) as TotalValue
  from table1

Thanks bitsmed.