VeloDB Cloud
SQL Manual
Functions
string-functions
ends_with

ends_with

Description

Syntax:

BOOLEAN ENDS_WITH (VARCHAR str, VARCHAR suffix)

If the string ends with the specified suffix, this function will return true; otherwise it will return false. If any argument is NULL, it will return NULL.

Example

mysql> select ends_with("Hello doris", "doris");
+-----------------------------------+
| ends_with('Hello doris', 'doris') |
+-----------------------------------+
|                                 1 | 
+-----------------------------------+

mysql> select ends_with("Hello doris", "Hello");
+-----------------------------------+
| ends_with('Hello doris', 'Hello') |
+-----------------------------------+
|                                 0 | 
+-----------------------------------+

Keywords

ENDS_WITH