ends_with
Returns NULL if either argument is NULL.
Syntax
Scalar
Arguments
Returns
- Type: BOOLEAN
- Possible values: TRUE or FALSE from a case-sensitive literal substring comparison.
- NULL behavior: Returns NULL if either argument is NULL.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Tests whether a string ends with another string.
ends_with
Returns NULL if either argument is NULL.
endswith(value, search)
| Name | Type | Required | Description |
|---|---|---|---|
| value | STRING | Yes | The string to inspect. |
| search | STRING | Yes | The substring to find. |
| Property | Value |
|---|---|
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |
SELECT endswith('abc', 'bc') AS found, endswith('abc', '') AS empty_search;
| found | empty_search |
|---|---|
| true | true |
SELECT endswith('report.csv', '.csv') AS csv_file, endswith('report.CSV', '.csv') AS different_case;
| csv_file | different_case |
|---|---|
| true | false |