In my database application I'm intending to give the users simple glob pattern search possibility besides standard search of text literal. (Let's not mention other search options to keep this question simple.)
They will be able to use wildcards
] for character matching.
Jo*n will match
Johann. Such an entered pattern will be converted to LIKE for T-SQL queries, to RLIKE in MariaDB queries and to VB.NET Like or C# LikeString() invocation for in-memory search.
Is it OK to lead users to get familiar with wildcard characters
? if these (used in SQL-89) were abandoned since SQL-92 standard in favor of
Honestly, I think that for non-advanced users,
? suit better than
- users know them from OS file masks
- they appear in data less often than
_, so there is lesser need to deal with escaping them
- they are better indicating their wildcard nature than
_which are a bit ambiguous (
50%can confuse inexperienced users to think it is a literal)
- they are somewhat easier to type because
*is directly available at key * on numeric pad, while all others need pressing Shift.
Are there any real reasons why I should favorize
_? If SQL-92 switched to them, perhaps they had some reasons.