starts_with({source_str}, {search_str})

Returns a Boolean indicating whether a string begins with the search string.

STARTS_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 begins with “Hen.”

SELECT City, STARTS_WITH(City, "Hen") as "startValue"
FROM "Superstore"
LIMIT 5;
City startValue
Henderson true
Henderson true
Los Angeles false
Fort Lauderdale false
Fort Lauderdale false