LIKE

Syntax

string_1 [ NOT ] LIKE string_2

Description

Matches the string string_1 to the template string_2 and returns TRUE on match. You can specify the value in string_2 or use the % character to match a string of any length.

The string_1 NOT LIKE option returns the opposite value.

Argument types:

  • string_1String
  • string_2String

Return type: Boolean

Examples

"raspberry" LIKE "%spb%" = TRUE
"raspberry" NOT LIKE "%spb%" = FALSE
IIF([Country] LIKE 'RU', 'Y', 'N')
IIF([Phone] LIKE '+7%', 'RU', 'notRU')

Data source support

ClickHouse 19.13, Microsoft SQL Server 2017 (14.0), MySQL 5.6, PostgreSQL 9.3.

Previous