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  eth.recent_blocks 
  WHERE STARTS_WITH(Category, 'OTHER')
  LIMIT 2

-- IncidntNum, Category, Descript
-- 160003130, OTHER OFFENSES, PAROLE VIOLATION
-- 160073014, OTHER OFFENSES, RESISTING ARREST

Last updated