Re: More efficient OR - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: More efficient OR
Date
Msg-id 1108570515.11967.223.camel@state.g2switchworks.com
Whole thread Raw
In response to More efficient OR  ("Keith Worthington" <keithw@narrowpathinc.com>)
List 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 by date:

Previous
From: Reinoud van Leeuwen
Date:
Subject: Re: More efficient OR
Next
From: Sean Davis
Date:
Subject: Re: More efficient OR