You can use the LIKE operator. Use underscore (_) for matching exactly one character. Use % for matching any number of characters.
- Find the count of all employees whose first name starts with Christ:
mysql> SELECT COUNT(*) FROM employees WHERE first_name LIKE 'christ%';+----------+| COUNT(*) |+----------+| 1157 |+----------+1 row in set (0.06 sec)
- Find the count of all employees whose first name starts with Christ and ends with ed:
mysql> SELECT COUNT(*) FROM employees WHERE first_name LIKE 'christ%ed';+----------+| COUNT(*) |+----------+| 228 |+----------+1 row in set (0.06 sec)
- Find the count of all employees whose first name contains sri:
mysql> SELECT COUNT(*) FROM employees WHERE first_name LIKE '%sri%'; ...