STARTSWITH (string)

Function STARTSWITH is also found in the following categories: Array functions.

Syntax

STARTSWITH( string, substring )

Description

Returns TRUE if string starts with substring. For case-insensitive searches, see ISTARTSWITH.

Argument types:

  • stringBoolean | Date | Datetime | Fractional number | Geopoint | Geopolygon | Integer | String | UUID
  • substringString

Return type: Boolean

Examples

STARTSWITH("Petrov Ivan", "Petrov") = TRUE
STARTSWITH("Lorem ipsum", "Lore") = TRUE
STARTSWITH("Lorem ipsum", "abc") = FALSE

Data source support

ClickHouse 21.8, Yandex Metrica, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, YDB.

Previous
Next