LIKE()

All functions > COMPARISON > LIKE()

Returns TRUE if a string matches a specified pattern with wildcards.

Signatures

Returns: TRUE if the string matches, FALSE if not, NULL if an input is NULL

LIKE(expr1: VARCHAR, expr2: VARCHAR, [escape: VARCHAR]) → BOOLEAN
sql
ParameterTypeRequiredDescription
expr1VARCHARYesString to match
expr2VARCHARYesPattern (% and _ wildcards)
escapeVARCHARNoEscape character for wildcards

Notes

  • Wildcard pattern matching
  • % matches zero or more characters
  • _ matches exactly one character
  • Case-sensitive matching
  • NULL inputs return NULL
  • An escape character can treat % and _ literally (default escape is backslash in the lowering template)

Related operators

Examples

LIKE — functional call

FeatureQL
SELECT
    f1 := LIKE('ab', 'a%') -- `LIKE(expr, pattern)` matches keyword `LIKE`
;
Result
f1 BOOLEAN
true

LIKE — chained

FeatureQL
SELECT
    f1 := ('ab').LIKE('a%') -- Receiver is the string; argument is the pattern
;
Result
f1 BOOLEAN
true

Last update at: 2026/05/26 17:22:09