”;
MySQL – Arithmetic Operators
Arithmetic operators in MySQL are tools for performing mathematical calculations, similar to how we use them in basic math. They allow us to manipulate numeric values in your database, just like we would in simple math problems. Following are the arithmetic operators in MySQL −
Sr.No. | Name & Description |
---|---|
1 | %, MOD (Modulus)
This operator divides left-hand operand by right-hand operand and, returns the remainder.
|
2 | * (Multiplication)
This operator multiplies values on either side of the operator.
|
3 | + (Addition)
This operator adds values on either side of the operator.
|
4 | – (Subtraction)
This operator subtracts right-hand operand from left-hand operand.
|
5 | – (Unary minus)
This operator is used to change the sign of the operand.
|
6 | / (Division)
This operator divides left-hand operand by right-hand operand.
|
7 | DIV (Integer division)
This operator performs the division operation and discards all the digits after the decimal.
|
”;