ends_with
Descriptionβ
Returns true
if a string ends with a specified suffix. Otherwise, it returns false
. If the argument is NULL, the result is NULL.
Syntaxβ
BOOLEAN ENDS_WITH (VARCHAR str, VARCHAR suffix)
Examplesβ
MySQL > select ends_with("Hello starrocks", "starrocks");
+-----------------------------------+
| ends_with('Hello starrocks', 'starrocks') |
+-----------------------------------+
| 1 |
+-----------------------------------+
MySQL > select ends_with("Hello starrocks", "Hello");
+-----------------------------------+
| ends_with('Hello starrocks', 'Hello') |
+-----------------------------------+
| 0 |
+-----------------------------------+
keywordβ
ENDS_WITH