ends_with

Description

Syntax

BOOLEAN ENDS_WITH (VARCHAR str, VARCHAR suffix)

It returns true if the string ends with the specified suffix, otherwise it returns false. If any parameter is NULL, it returns NULL.

example

  1. mysql> select ends_with("Hello doris", "doris");
  2. +-----------------------------------+
  3. | ends_with('Hello doris', 'doris') |
  4. +-----------------------------------+
  5. | 1 |
  6. +-----------------------------------+
  7. mysql> select ends_with("Hello doris", "Hello");
  8. +-----------------------------------+
  9. | ends_with('Hello doris', 'Hello') |
  10. +-----------------------------------+
  11. | 0 |
  12. +-----------------------------------+

keywords

  1. ENDS_WITH