MySQL Operators

Arithmetic/Logic ops.

MySQL Operators

Operators are reserved words or characters used primarily in a MySQL statement's WHERE clause to perform operation(s), such as comparisons and arithmetic operations.

Types of Operators

  • Arithmetic: +, -, *, /, %
  • Bitwise: &, |, ^
  • Comparison: =, >, <, >=, <=, <>, BETWEEN, LIKE, IN
  • Compound: +=, -=, *=, /=, %=
  • Logical: ALL, AND, ANY, BETWEEN, EXISTS, IN, LIKE, NOT, OR, SOME

Example

SELECT 30 + 20;