January 2018
Intermediate to advanced
446 pages
12h 57m
English
You can use the LIKE operator. Use underscore (_) for matching exactly one character. Use % for matching any number of characters.
mysql> SELECT COUNT(*) FROM employees WHERE first_name LIKE 'christ%';+----------+| COUNT(*) |+----------+| 1157 |+----------+1 row in set (0.06 sec)
mysql> SELECT COUNT(*) FROM employees WHERE first_name LIKE 'christ%ed';+----------+| COUNT(*) |+----------+| 228 |+----------+1 row in set (0.06 sec)
mysql> SELECT COUNT(*) FROM employees WHERE first_name LIKE '%sri%'; ...
Read now
Unlock full access