starts_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 starts with another string.
starts_with
Returns NULL if either argument is NULL.
startswith(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 startswith('abc', 'ab') AS found, startswith('abc', '') AS empty_search;
| found | empty_search |
|---|---|
| true | true |
SELECT startswith('Order-42', 'Order') AS same_case, startswith('Order-42', 'order') AS different_case;
| same_case | different_case |
|---|---|
| true | false |