SQL SUM() Function

SQL SUM() function return the sum of expression.

Supported Oracle SQL Version

  • Oracle 8i
  • Oracle 9i
  • Oracle 10g
  • Oracle 11g
  • Oracle 12c
  • Oracle 18c

Syntax

SUM( expression )

Example

Consider following emp_salary is our example table to find summation salary using SQL SUM function.

SQL> SELECT * from emp_salary;

       NUM NAME                          SALARY
---------- ------------------------- ----------
         2 Max Miller                      2830
         3 Beccaa Moss                     2175
         4 Paul Singh                      5405
         5 Ken Myer                        3390
         6 Jack Evans                      3870

SQL> SELECT SUM(salary) "SUM SALARY" FROM emp_salary;

SUM SALARY
----------
     20070

Run it...   »