Subject Re: [Firebird-general] Why does LIKE uses '%' as a wildcard
Author Scott Morgan
On 07/29/2011 04:41 PM, Lester Caine wrote:
>
> 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 _ ...
>

Yes, but why is it the like that in the standard? Somebody must have
made the decision.

Scott