8
Using Wildcard Filtering
In this chapter, you’ll learn what wildcards are, how they are used, and how to perform wildcard searches by using the LIKE
operator for sophisticated filtering of retrieved data.
Using the LIKE
Operator
All the operators we have studied so far filter against known values. Whether matching one or more values, testing for greater-than or less-than known values, or checking a range of values, the common denominator is that the values used in the filtering are known. But filtering data that way does not always work. For example, how could you search for all products that contained the text anvil within the product name? You cannot do that with simple comparison operators; it’s a job for wildcard searching.
You can use ...
Get MySQL Crash Course, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.