Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

Sum

Example

Please provide the total of the “Quantity” column from the “OrderDetails” table.

SELECT Sum(Quantity) AS TotalItemsOrdered FROM OrderDetails;

Definition and Usage

The SUM() function computes the total of a given set of values, disregarding any NULL values.

Syntax

Sum(expression)

Parameter Values

Parameter

Description

expression

Required. A field or a formula is necessary as an argument for the SUM() function.

Technical Details

WORKS IN

From Access 2000