Rules of Precedence
When your SQL contains complex expressions, the subexpressions are evaluated based on MySQL’s rules of precedence. Of course, you may always override MySQL’s rules of precedence by enclosing an expression in parentheses.
BINARY
NOT
-
(unary minus)* / %
+ -
<< >>
&
|
< <= > >= = <=> <> IN IS LIKE REGEXP
BETWEEN
AND
OR
Get Managing & Using MySQL, 2nd Edition 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.