![]() Previous |
![]() Next |
The pattern-matching conditions compare character data.
The LIKE
operators specify a test involving pattern matching. Whereas the equality operator (=
) exactly matches one character value to another, the LIKE
operators can match patterns defined by special pattern-matching ("wildcard") characters.
You can choose from these LIKE
operators:
LIKE Pattern-Matching Operators
Operator | Description |
---|---|
|
Uses characters in the input character set. |
|
Uses Unicode complete characters. It treats a Unicode supplementary character as two characters. |
|
Uses UCS2 code points. It treats a Unicode supplementary character as one character. |
|
Uses UCS4 code points. It treats a composite character as one character. |
char1
is a text expression for the search value.
char2
is a text expression for the pattern. The pattern can contain these wildcard characters:
An underscore (_) matches exactly one character (as opposed to one byte in a multibyte character set) in the value.
A percent sign (%) can match zero or more characters (as opposed to bytes in a multibyte character set) in the value. A '%' cannot match a null.
esc_char
is a text expression, usually a literal, that is one character long. This escape character identifies an underscore or a percent sign in the pattern as literal characters instead of wildcard characters. You can also search for the escape character itself by repeating it. For example, if @ is the escape character, then you can use @% to search for % and @@ to search for @.