Skip to main content
Version: 24.3.x

Categories: String

STARTS_WITH

Returns whether a string starts with another string. The comparison is case-sensitive.

Syntax

STARTS_WITH(expression1 string, expression2 string) → bit

  • expression1: The input expression to search.
  • expression2: The string to search for in the specified expression.

Examples

STARTS_WITH example
SELECT IncidntNum, Category, Descript FROM  "Samples"."samples.dremio.com"."SF_incidents2016.json"
WHERE STARTS_WITH(Category, 'OTHER')
LIMIT 2
-- IncidntNum, Category, Descript
-- 160003130, OTHER OFFENSES, PAROLE VIOLATION
-- 160073014, OTHER OFFENSES, RESISTING ARREST