Match set 

If a match set is specified, this position in the search pattern can be replaced by the exact number of characters specified in the match set.

Syntax

<match_set> ::= <underscore> | ? | X'1E' | <match_char>
| ([< Ù
(only for code type EBCDIC) | ~ (only for code type ASCII) | Ø >]<match class>...)

<match_char>    ::= any character except %, *, X'1F', underscore, ?, X'1E', (.
<match_class>   ::= <match_range> | <match_element>

<match_range>   ::= <match_element>-<match_element> (character range)

<match_element> ::= any character except )

underscore

Explanation

A LIKE predicate is used to search for character strings that have a certain pattern. Match sets can be used to specify the pattern ( pattern_element).

Model table: customer

Finding all customers whose names consist of six letters and begin with 'P':

SELECT name, city FROM customer
WHERE name LIKE 'P?????'

NAME

CITY

Porter

Los Angeles

Peters

Los Angeles