MySQL Arithmetic Operators

Profile picture for user arilio666

We will see some arithmetic operators from MySQL in action with real-time examples straight out of the workbench.

1. Operator +

SELECT 30+20

mysql plus operator

  • The '+' operator sums up the provided value and satisfies the need for adding.

2. Operator -

SELECT 33-11

mysql minus operator

  • The '-' operator subtracts the provided value and satisfies the need for subtraction.

3. Operator *

SELECT 33*11

mysql multiplication operator

  • The '*' operator multiplies the provided value and thus satisfies the need for doing multiplication.

4. Operator /

SELECT 33/11

MySQL Divide Operator

  • The '/' operator divides the provided value.

5. Operator %

SELECT 3113%111

MySQL Modulus Operator

  • The '%' operator does the modulus operation for the provided values.
Tags