- Empty pattern only matches empty string
- Empty pattern matches every string
The following example returns the JSON string foobar, because it has the substring ob.
SELECT JSON_QUERY('["foobar"]'
,'$[*] ? (@ has substring "ob")'
)
FROM …Related
Primer: “JSON Path”
Standard SQL/JSON string matching predicates:
starts withlike_regex
Non-Standard SQL/JSON string matching predicates:
likeeq_regex
Normative References
The SQL/JSON path predicate has substring is not standardized in ISO/IEC 9075-2:2023.

