Prev Next
SQL SUM() function returns the sum of a column. The column should be numeric. Syntax for SQL SUM() function is given below.
SQL Syntax for SUM() function:
| Syntax for SUM() function in SQL | SELECT SUM(column_name) FROM table_name; |
Please consider the following table with few records as given below.
Table name (for example): student
Column names in this table: Student_ID, Student_name, City and Marks
Available records: 4 rows
