MySQL supports many operators for filtering results. Refer to https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html for a list of all the operators. We will discuss a few operators here. LIKE and RLIKE are explained in detail in the next examples:
- Equality: Refer to the preceding example where you have filtered using =.
- IN: Check whether a value is within a set of values. For example, find the count of all employees whose last name is either Christ, Lamba, or Baba:
mysql> SELECT COUNT(*) FROM employees WHERE last_name IN ('Christ', 'Lamba', 'Baba');+----------+| COUNT(*) |+----------+| 626 |+----------+1 row in set (0.08 sec)
- BETWEEN...AND: Check whether a value is within a range of values. For example, find the number ...