MySQL Operator

Operators in MySQL include: arithmetic operators, comparison operators, logical operators, and bitwise operators.

Operator Function
+ Addition
- Subtraction
* Multiplication
/, DIV Division; returns quotient
%, MOD Modulo; returns remainder

Comparison Operators

Operator Function
= Equal
<> or != Not equal
<=> Null-safe equality
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
BETWEEN Exists within a specified range
IN Exists in a specified set
IS NULL Is null
IS NOT NULL Not null
LIKE Wildcard expression
REGEXP or RLIKE Regular expression match

Logical Operators

Operator Function
NOT or ! Logical negation
AND or && Logical conjunction (AND)
OR or | Logical disjunction (OR)
XOR Logical exclusive OR

Bitwise Operators

Operator Function
& Bitwise AND
|| Bitwise OR
^ Bitwise XOR
~ Bitwise NOT
>> Right shift
<< Left shift