Files
doris/docs/en/sql-manual/sql-functions/string-functions/ends_with.md
jiafeng.zhang 267e8b67c2 [refactor][doc]The new version of the document is online (#9272)
replace the `docs/` with `new-docs/`
2022-04-28 15:22:34 +08:00

1.5 KiB

title, language
title language
ends_with en

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

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 | 
+-----------------------------------+

keyword

ENDS_WITH