DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info) operator-precedence

Info Catalog (mysql.info) non-typed-operators (mysql.info) non-typed-operators (mysql.info) type-conversion
 
 12.1.1 Operator Precedence
 --------------------------
 
 Operator precedences are shown in the following list, from lowest
 precedence to the highest. Operators that are shown together on a line
 have the same precedence.
 
      :=
      ||, OR, XOR
      &&, AND
      NOT
      BETWEEN, CASE, WHEN, THEN, ELSE
      =, <=>, >=, >, <=, <, <>, !=, IS, LIKE, REGEXP, IN
      |
      &
      <<, >>
      -, +
      *, /, DIV, %, MOD
      ^
      - (unary minus), ~ (unary bit inversion)
      !
      BINARY, COLLATE
 
 The precedence shown for `NOT' is as of MySQL 5.0.2. For earlier
 versions, or from 5.0.2 on if the `HIGH_NOT_PRECEDENCE' SQL mode is
 enabled, the precedence of `NOT' is the same as that of the `!'
 operator. See  server-sql-mode.
 
 The precedence of operators determines the order of evaluation of terms
 in an expression. To override this order and group terms explicitly,
 use parentheses. For example:
 
      mysql> SELECT 1+2*3;
              -> 7
      mysql> SELECT (1+2)*3;
              -> 9
 
Info Catalog (mysql.info) non-typed-operators (mysql.info) non-typed-operators (mysql.info) type-conversion
automatically generated byinfo2html