A single-character wildcard expresses a different constraint from a variable-length wildcard. Decide whether punctuation in a search pattern is literal.
Worked example
SELECT 'log1' LIKE 'log_' AS matches;Result
[
{
"matches": 1
}
]Implementation notes
Pattern matching and equality use different operators. If users expect punctuation to be literal, escape their pattern before introducing your own wildcard.
Try it yourself
Compare strings with zero, one and two characters in the wildcard position.
Open the SQL example →Editorial date November 1, 2026 · Published December 6, 2026