STARTS_WITH

All functions > STRING > STARTS_WITH

Returns TRUE if a string starts with a specified prefix.

Signatures

Returns: TRUE if string starts with prefix, FALSE otherwise

STARTS_WITH(string: VARCHAR, prefix: VARCHAR) → BOOLEAN
sql
ParameterTypeRequiredDescription
stringVARCHARYesString to check
prefixVARCHARYesPrefix to look for

Notes

  • Case-sensitive comparison
  • Returns FALSE if prefix is longer than string
  • Returns TRUE if string and prefix are identical

Examples

FeatureQL
SELECT
    f1 := STARTS_WITH('Hello World', 'Hello'),  -- Starts with prefix
    f2 := STARTS_WITH('Hello World', 'hello'),  -- Case-sensitive
    f3 := STARTS_WITH('Hello World', 'World'),  -- Middle of string
    f4 := STARTS_WITH('test', 'test'),  -- Exact match
    f5 := STARTS_WITH('test', 'testing'),  -- Prefix longer than string
    f6 := STARTS_WITH('€100', '€')  -- Unicode prefix
;
Result
f1 BOOLEANf2 BOOLEANf3 BOOLEANf4 BOOLEANf5 BOOLEANf6 BOOLEAN
truefalsefalsetruefalsetrue

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19