If a match_string is specified, this position in the search pattern can be replaced by any number of characters.
<match_string> ::= % | X'1F'
A LIKE predicate is used to search for character strings that have a certain pattern. Match_string can be used to specify the pattern (pattern element).
Example table: customer
Finding all customers whose first names have any lengths and begin with 'M':
SELECT firstname, name FROM customer
WHERE firstname LIKE 'M%'
FIRSTNAME |
NAME |
Martin |
Porter |
Michael |
Porter |
Mark |
Griffith |