Re: More efficient OR

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: More efficient OR
Дата
Msg-id 1108570515.11967.223.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на More efficient OR  ("Keith Worthington" <keithw@narrowpathinc.com>)
Список pgsql-sql
On Wed, 2005-02-16 at 10:02, Keith Worthington wrote:
> Hi All,
> 
> In several of my SQL statements I have to use a WHERE clause that contains
> mutiple ORs.  i.e.
> 
> WHERE column1 = 'A' OR
>       column1 = 'B' OR
>       column1 = 'C'
> 
> Is there a more efficient SQL statement that accomplishes the same limiting
> functionality?

The in() construct is (nowadays) basically the same as ORing multiple
columns;

where column1 in ('A','B','C')


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

Предыдущее
От: Reinoud van Leeuwen
Дата:
Сообщение: Re: More efficient OR
Следующее
От: Sean Davis
Дата:
Сообщение: Re: More efficient OR