Re: What should this query match?
| От | Peter Eisentraut |
|---|---|
| Тема | Re: What should this query match? |
| Дата | |
| Msg-id | 200509141248.24909.peter_e@gmx.net обсуждение исходный текст |
| Ответ на | What should this query match? (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>) |
| Ответы |
Re: What should this query match?
|
| Список | pgsql-sql |
Am Mittwoch, 14. September 2005 11:54 schrieb Joost Kraaijeveld:
> Why do the following queries return the same count (may be related to
> the first question)
>
> SELECT COUNT(*) FROM customers
> WHERE lower(lastName) < lower('Jan%')
>
> SELECT COUNT(*) FROM customers
> WHERE lower(lastName) <= lower('Jan%')
These queries should return the same answer if the query does not contain the
value 'Jan%' (or differently capitalized versions). I suspect that you are
actually attempting to use % as a wild card, but none of your queries use a
pattern matching operator, so I'd go back and check if your queries really
are what you think they should be.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
В списке pgsql-sql по дате отправления: