LIKE is a widely used component of the SQL language that allows the user to perform fuzzy searches. Sometimes, you have an idea about what you are looking for but you are not exactly sure what it is. In these situations, a wildcard search can come in handy and improve user experience dramatically. Just think of the following example: you are reading a fax that has just dropped in. On a poor-quality fax, can you really distinguish a B from an 8 all the time? I guess not.
LIKE will fix that by allowing you to put placeholders in a query.
To demonstrate the power of
LIKE and the problems arising along with it, I have compiled a small example. The goal is to look for names of cities and villages. Here is the required data: