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
| Parameter | Type | Required | Description |
|---|---|---|---|
expr1 | VARCHAR | Yes | String to test |
patterns | ARRAY(VARCHAR) | Yes | Wildcard patterns (%, _); same escape rules as LIKE |
escape | VARCHAR | No | Escape character for % / _ in each pattern |
Notes
- Keyword form:
LIKE ANY (pat1, pat2, …)(andALL/NONE), optionalESCAPE escape; callable / chained forms useARRAY(...)/ARRAY[...]for patterns and an optional thirdescapeargument - Wildcards
%and_in each pattern - Case-sensitive LIKE per pattern
ANY: TRUE if at least one pattern matchesALL: TRUE if every pattern matches (empty pattern list is vacuously TRUE)NONE: TRUE if no pattern matches (empty list: TRUE)- NULL
expr1or NULLpatterns→ 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 |