This topic describes how to use the LIKE operator for character matching.
In LIKE character matching,
% is used to match a string that consists of zero or more characters, and
_ is used to match a single character.
To match the
_character itself, you must escape the character. Use
\\_to match the
'abcd' like 'ab%' -- true 'abcd' like 'ab_' -- false 'ab_cde' like 'ab\\_c%'; -- true
Notice MaxCompute SQL statements support only UTF-8 character sets. If data is encoded in another format, the calculation result may be incorrect.