Wednesday, March 7, 2012

How to add all the values in a single column in a table?

numbers
2
4
2
Above is an example of my table with a single column. My problem is how to add all the numbers in that column to make it 8? The rows are also dynamic.
Your help is highly appreciated.

Is this what you are looking for:

SELECT SUM(numbers) AS total

Does this help?

|||select sum(numbers) from table
|||

You need to use a SUM function

select sum(numbers) from yourTable

Nick

|||Thats exactly really how i want it to be...! Thanks for the great help everyone....I really appreciate it...!

No comments:

Post a Comment