C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL SUM() FunctionThe sum() is a Math function of MySQL. This function is used to sum the values of given expressions. Syntaxselect sum(aggregate_expression) from tables [where conditions]; 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:![]() Example 1Select sum(marks) from table2; Output: ![]() Example 2Select sum(marks) from table2; Output: ![]()
Next TopicMySQL Math
|