LIKE
LIKE
LIKE
The LIKE
operator is used to match a specified character pattern in a string.
These patterns can contain regular characters as well as wildcards. Wildcard characters can be escaped using the single character specified for the ESCAPE
parameter.
Note that matching is case sensitive. To do case insensitive matching, you can first apply either the LOWER
or UPPER
function to the expression you are matching.
Syntax
Note that if pattern
or escape_character
is null
, then the expression evaluates to null
.
Wildcards
Escape character
The escape_character
can be any character that you define that is used to escape one of the wildcard characters when you want to match the literal character itself.
For example, if you wanted to match the percent sign %
within expression
and not use it as a wildcard, you could do LIKE '#%' ESCAPE '#'
. Using #
as the escape character means that when it's put in front of a wildcard character such as %
, it matches the exact character %
instead of representing zero, one, or multiple characters the way it typically does.
Examples
Transformation job with sample data
Query result
Last updated