Arithmetic Operators
Operator: numeric_expr + numeric_expr
This operator performs the addition operation and returns the sum of the two numeric expressions.
SELECT (12+5)
--> 17
Operator: numeric_expr – numeric_expr
This operator performs the subtraction operation and returns the difference of the two numeric expressions. This operator can also be used to turn a given value into a negative value.
SELECT (17 - 5)
--> 12
Operator: numeric_expr * numeric_expr
This operator performs the multiplication of two expressions and returns the product.
SELECT (2*6)
--> 12
Operator: numeric_expr / numeric_expr
This operator performs the division of the first expression by the second expression and returns the quotient.
SELECT (12 / 6)
--> 2
Operator: numeric_expr % numeric_expr
This is the modulo operator. It returns the value of the remainder of a division operation.
SELECT (13 % 6)
--> 1