LIKE_ALL()

All functions > COMPARISON > LIKE_ALL()

TRUE if the string matches LIKE for every pattern in an array.

Signatures

Returns: TRUE, FALSE, or NULL following three-valued logic for NULL inputs or pattern elements

LIKE_ALL(expr1: VARCHAR, patterns: ARRAY(VARCHAR), [escape: VARCHAR]) → BOOLEAN
sql
ParameterTypeRequiredDescription
expr1VARCHARYesString to test
patternsARRAY(VARCHAR)YesWildcard patterns (%, _); same escape rules as LIKE
escapeVARCHARNoEscape character for % / _ in each pattern

Notes

  • Keyword form: LIKE ANY (pat1, pat2, …) (and ALL / NONE), optional ESCAPE escape; callable / chained forms use ARRAY(...) / ARRAY[...] for patterns and an optional third escape argument
  • Wildcards % and _ in each pattern
  • Case-sensitive LIKE per pattern
  • ANY: TRUE if at least one pattern matches
  • ALL: TRUE if every pattern matches (empty pattern list is vacuously TRUE)
  • NONE: TRUE if no pattern matches (empty list: TRUE)
  • NULL expr1 or NULL patterns → NULL
  • BigQuery: this form is not translated (NOT_SUPPORTED)

Related operators

Examples

LIKE_ALL — functional call

FeatureQL
SELECT
    f1 := LIKE_ALL('hello', ARRAY['%e%', '%o']) -- `LIKE_ALL(expr, patterns)` matches keyword `LIKE ALL`
;
Result
f1 BOOLEAN
true

LIKE_ALL — chained

FeatureQL
SELECT
    f1 := ('hello').LIKE_ALL(ARRAY['%e%', '%o']) -- Receiver is the string; argument is the pattern array
;
Result
f1 BOOLEAN
true

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