Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 816 Bytes

starts_with.md

File metadata and controls

29 lines (22 loc) · 816 Bytes
description
Returns whether a string starts with another string. The comparison is case-sensitive.

STARTS_WITH

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

{% code title="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

{% endcode %}