.
Sum Function In SQL - How to use Sum Function in SQL?
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.
Syntax of SUM Function
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 the 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
1 Comments
0faunaOrunsu Dennis Steele https://wakelet.com/wake/CZ9sygkzbhfjathshR9pE
ReplyDeletepalourere