STARTS_WITH
All functions > STRING > STARTS_WITH
Checks if a string starts with a specified prefix.
Syntax
STARTS_WITH(expr, search)
sql
Arguments
Parameter | Type | Required | Description |
---|---|---|---|
string | VARCHAR | Yes | String to check |
prefix | VARCHAR | Yes | Prefix to look for |
Returns
TRUE if string starts with prefix, FALSE otherwise
Notes
- Case-sensitive comparison
- Returns FALSE if prefix is longer than string
- Returns TRUE if string and prefix are identical