Order of Operations

Operator precedence is the order in which an operator is executed.

In SQL the operator precedence is as follows:
  1. Parentheses
  2. Multiplication or division
  3. Addition or subtraction
  4. NOT
  5. AND
  6. OR
Parentheses can be used to override these rules of precedence as shown in the following example:
A + B * C
Performs B * C and then adds A to the result.
(A + B) * C

Performs A + B first and then multiply the result by C.