This operation checks whether a string matches the specified template.
The value of the LIKE operator is True if the expression value matches the template, and False otherwise.
The following characters in a template have a special meaning:
- % (percent sign). A sequence containing zero or more custom characters.
- _ (underscore). A custom character.
- […] (one or more characters in brackets). Any character from a set of characters enclosed in brackets. A character set can contain ranges, such as a–z, meaning any character within the range, including the limits of the range.
- [^…] (a negation sign followed by one or more characters, in brackets). Any character except the characters enclosed in brackets.
Any other character represents itself and does not have any additional use. If you need to use one of the special characters as itself, precede it with the ESCAPE keyword.
For example, the following template stands for a substring including the following sequence of characters: the letter A; the letter B; the letter C; a digit; one of the letters a, b, c, or d; an underscore; the letter a; the letter b; the letter c. This sequence can begin anywhere in the string.
"%ABC[0–9][abcd]\_abc%" ESCAPE "\"Next page: Comparison operations