Numeric Operators

In Lesson 4, “Filtering and Sorting Data,” you saw how the comparison operators in MySQL were used to restrict the number of rows returned by a query.

Numeric operators are used in a similar way—two values appear on either side of a symbol or a sequence of symbols. This expression equates to a new value in the SQL statement.

Operators and Operands

In the expression a + b, the + symbol is the operator and a and b are known as operands.

Using Arithmetic Operators

An expression that uses a numeric operator can be used in a SQL statement anywhere that you could otherwise put a numeric value. You can also use a numeric operator to ...

Get Sams Teach Yourself MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.