Returns a Boolean indicating whether a string ends with the search string.
ENDS_WITH() follows this syntax.
-
source_str
- : The string to be searched.
-
search_str
- : The string to search for within the source string.
Example
This example returns a Boolean that confirms whether the value in the City field ends with “ale.”
SELECT City, ENDS_WITH(City, "ale") as "endValue"
FROM "Superstore"
LIMIT 5;
| City | endValue |
|---|---|
| Henderson | false |
| Henderson | false |
| Los Angeles | false |
| Fort Lauderdale | true |
| Fort Lauderdale | true |