Home » MySQL Math SUM() Function

MySQL Math SUM() Function

by Online Tutorials Library

MySQL SUM() Function

The sum() is a Math function of MySQL. This function is used to sum the values of given expressions.

Syntax

Parameter:

aggregate_expression: It is the column to be summed.

tables: It is the name of the table in which given aggregate_expression is present.

where conditions: It is optional used to apply the specified condition.

Returns:

This function returns the sum of given expression.

Table:

MySQL Math SUM() Function

Example 1

Output:

MySQL Math SUM() Function

Example 2

Output:

MySQL Math SUM() Function

Next TopicMySQL Math

You may also like