Behavior of the ESCAPE Character

Teradata Vantage™ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

When escape_character is used in (generic) string_2, it must be followed immediately by a metacharacter of the appropriate server character set or another escape_character.

The resultant two-character sequence matches a single character in string_1 if and only if the character in string_1 collates identically to the character following the escape_character in string_2.

In other words, escape_character is ignored for matching purposes and the character following escape_character is matched for a single occurrence of itself.

When string_1 and string_2 do not share a common server character set, then the valid metacharacters are SPACING UNDERSCORE and PERCENT SIGN because the arguments are translated to UNICODE automatically when mismatched. Their behavior then follows the rules described in “Implicit Character-to-Character Translation”.