Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 36.5Mb
PDF (A4) - 36.5Mb
PDF (RPM) - 36.6Mb
HTML Download (TGZ) - 10.6Mb
HTML Download (Zip) - 10.6Mb
HTML Download (RPM) - 9.4Mb
Man Pages (TGZ) - 223.1Kb
Man Pages (Zip) - 331.1Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb
Excerpts from this Manual

12.4 Operators

Table 12.3 Operators

Name Description
& Bitwise AND
> Greater than operator
>> Right shift
>= Greater than or equal operator
< Less than operator
<>, != Not equal operator
<< Left shift
<= Less than or equal operator
<=> NULL-safe equal to operator
%, MOD Modulo operator
* Multiplication operator
+ Addition operator
- Minus operator
- Change the sign of the argument
-> Return value from JSON column after evaluating path; equivalent to JSON_EXTRACT().
->> (introduced 5.7.13) Return value from JSON column after evaluating path and unquoting the result; equivalent to JSON_UNQUOTE(JSON_EXTRACT()).
/ Division operator
:= Assign a value
= Assign a value (as part of a SET statement, or as part of the SET clause in an UPDATE statement)
= Equal operator
^ Bitwise XOR
AND, && Logical AND
BETWEEN ... AND ... Whether a value is within a range of values
BINARY Cast a string to a binary string
CASE Case operator
DIV Integer division
IN() Whether a value is within a set of values
IS Test a value against a boolean
IS NOT Test a value against a boolean
IS NOT NULL NOT NULL value test
IS NULL NULL value test
LIKE Simple pattern matching
NOT, ! Negates value
NOT BETWEEN ... AND ... Whether a value is not within a range of values
NOT IN() Whether a value is not within a set of values
NOT LIKE Negation of simple pattern matching
NOT REGEXP Negation of REGEXP
OR, || Logical OR
REGEXP Whether string matches regular expression
RLIKE Whether string matches regular expression
SOUNDS LIKE Compare sounds
XOR Logical XOR
| Bitwise OR
~ Bitwise inversion