We will see some arithmetic operators from MySQL in action with real-time examples straight out of the workbench.
1. Operator +
SELECT 30+20
- The '+' operator sums up the provided value and satisfies the need for adding.
2. Operator -
SELECT 33-11
- The '-' operator subtracts the provided value and satisfies the need for subtraction.
3. Operator *
SELECT 33*11
- The '*' operator multiplies the provided value and thus satisfies the need for doing multiplication.
4. Operator /
SELECT 33/11
- The '/' operator divides the provided value.
5. Operator %
SELECT 3113%111
- The '%' operator does the modulus operation for the provided values.
- Log in to post comments