| bit_expr  % bit_expr | bit_expr  ^ bit_expr | bit_expr  + interval_expr | bit_expr  - interval_expr | simple_expr 

simple_expr : literal | identifier | function_call | simple_expr  COLLATE collation_name | param_marker | variable | simple_expr  || simple_expr | + simple_expr | - simple_expr | ~ simple_expr | ! simple_expr | BINARY simple_expr | ( expr  [, expr ] ...) | ROW ( expr , expr  [, expr ] ...) | ( subquery ) | EXISTS ( subquery ) | { identifier expr } | match_expr | case_expr | interval_expr 

For operator precedence, see Section 12.4.1, “Operator Precedence” . The precedence and meaning of some operators depends on the SQL mode: 

•By default, ||  is a logical OR  operator. With PIPES_AS_CONCAT  enabled, ||  is string concatenation, with a precedence between ^  and the unary operators. 

•By default, !  has a higher precedence than NOT . With HIGH_NOT_PRECEDENCE  enabled, !  and NOT have the same precedence. 

## Expression Term Notes 

See Section 5.1.11, “Server SQL Modes” . 

For literal value syntax, see Section 9.1, “Literal Values” . 

For identifier syntax, see Section 9.2, “Schema Object Names” . 

Variables can be user variables, system variables, or stored program local variables or parameters: 

•User variables: Section 9.4, “User-Defined Variables” 

•System variables: Section 5.1.9, “Using System Variables” 

•Stored program local variables: Section 13.6.4.1, “Local Variable DECLARE Statement” 

•Stored program parameters: Section 13.1.17, “CREATE PROCEDURE and CREATE FUNCTION Statements” 

param_marker  is ?  as used in prepared statements for placeholders. See Section 13.5.1, “PREPARE Statement” . 

( subquery )  indicates a subquery that returns a single value; that is, a scalar subquery. See Section 13.2.11.1, “The Subquery as Scalar Operand” . 

