Re: SQL Where Like - Range it?!

Поиск
Список
Период
Сортировка
От Len Morgan
Тема Re: SQL Where Like - Range it?!
Дата
Msg-id 007201c0cf29$ad97f640$0908a8c0@H233.bstx.cc
обсуждение исходный текст
Ответ на SQL Where Like - Range it?!  (Sterling <smullett@omeninc.com>)
Ответы Re: SQL Where Like - Range it?!  (will trillich <will@serensoft.com>)
Список pgsql-general
>What I'd like to do is pull a list of records where there is a range of
>last names; say from A - F.
>select * from table where last_name LIKE 'A%' AND last_name LIKE 'F%' -
>for example.
>
>The above code I've tried for this doesn't seem to work as I'd expect it
>too?

SELECT * FROM table WHERE last_name BETWEEN 'A' AND 'Fzzzzzzzzzzzzz' ;
worked for me.

You could also use BETWEEN 'A' AND 'G' to avoid all of the zzzzzzzzs at the
end.  Crude but effective.

len morgan


В списке pgsql-general по дате отправления:

Предыдущее
От: Jelle Ouwerkerk
Дата:
Сообщение: rotating log files
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: rotating log files