Subject Re: [Firebird-general] Why does LIKE uses '%' as a wildcard
Author Lester Caine
Scott Morgan wrote:
> Just an idle question for the weekend, perhaps one for the old hands.
> Been wondering why the LIKE statement uses '%' as the wildcard character
> rather than more common '*' (familiar in file globbing and regex). A bit
> of googling doesn't turn up much.
> I could understand that it may pre-date the '*' convention and whoever
> picked it just went with the first ASCII char they thought of, but it
> seems odd if you consider that you can use '*' in SELECT statements as a
> kind of 'field-wildcard', why not 'SELECT % FROM ...'?
> Anybody else been kept up at night with this pointless question?:)

It's an SQL standard thing ;) M$ still use * and ? in Access I think, but the
standards document define them as % and _ ...

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Firebird -