Dev Helpers

SQL / Text search

Match one character

Dev Helpers · November 1, 2026

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

Related articles

Compare two literal lists

Set operations compare rows under SQL's rules for duplicates. Check whether the result represents membership or the number of occurrences.

Count jobs per active day

Grouping timestamps by day produces counts only for days present in the data. A continuous chart may need a calendar series as well.