In SQL Tutorial since we have started dealing with numbers, the next
natural question to ask is if it is possible to do math
on those numbers, such as summing them up or taking their
average or multiplying them. The answer is yes! SQL has several arithmetic
functions, and they are mentioned below
Table of
Employees_Salary
$4200 represents the sum of all Salary entries:
$1100 + $1000 + $1100 + $1000.
In addition to using SQL functions, it is also possible
to use SQL to perform simple tasks such as addition
(+) and subtraction (-) as required. For character-type data,
there are also several SQL String Functions available,
such as
SQL Concatenation Function,
SQL Trim Function, and
SQL Substring functions.
Different RDBMS vendors have different SQL string functions
implementations, and it is best to consult the references
for your RDBMS to see how these functions are used.