SQL Sum Function With Example

.
Sum  Function In SQL - How to use Sum Function in SQL?

Sum Function in SQL with Example

SUM()
Sum  Function is used to Display The Total Sum of A Column,
Sum functions are used to display the total sum of a numeric column
NOTE- the Sum function column should be numeric.


Sum() Syntax- 
The Basic Syntax For Sum Function is given Below

Sum Function Without Condition

SELECT SUM(column_name)FROM table_name;

Sum Function With Condition

SELECT SUM(column_name)FROM table_name WHERE condition;


Example OF Sum () Function

SQL Query-
SELECT SUM(Marks)FROM Student;

In Above Example It Will Display The Total Sum Of the Marks Column in the Student Table.

Hope!!! The above Tutorial on SUM Function with Example is helpful for you...

Team,
QA acharya

.

Post a Comment

3 Comments