Sum SQL Function

The Sum() function is an aggregate function which takes one (1) argument and returns the sum of all non-null values, if there are no non-null values then it will return null. Sum() will throw an "integer overflow" exception if all inputs are integers or NULL and an integer overflow occurs at any point during the computation.

Syntax Sum( ColumnName )

		/* Following will return actual SUM as integer */ 
SELECT Sum(OrderAmount);