Like Usage

Last Updated: Jun 10, 2016

In LIKE matching, ‘%’ indicates matching any multiple characters. ‘_’ indicates matching a single character. To match ‘%’ or ‘_’ itself, you must escape it. ‘\%’ matches the character ‘%’ and ‘\_’ matches the character ‘_’.

  1. 'abcd' like 'ab%' -- true
  2. 'abcd' like 'ab\%' -- false
  3. 'ab%cd' like 'ab\\%%' -- true


  • About character set of string, ODPS SQL only supports the UTF-8 character set. If the data is encoded in other formats, maybe the calculation result is not correct.
Thank you! We've received your feedback.