Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: select stmt with long list of comparisons ....howto

Re: select stmt with long list of comparisons ....howto

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Fri, 13 Apr 2001 22:34:50 -0700
Message-ID: <3AD7E17A.233D3DE@exesolutions.com>

You've got me confused here. You give an example of your problem and then provide the solution. What is wrong with

select *
from table1
where title IN ('director','officer','chairman','accountant');

Or don't you recognize it as perfectly good SQL?

Daniel A. Morgan

kilidire wrote:

> Hi,
> I have a very basic question that I would like resolvein in a more
> efficient way.
>
> select * from table1 where title = 'director' or title = 'officer' or
> title='chairman' .....
>
> Is there a more efficient way to do that if I have a long list of
> comaparisons to do in a select statement.
> Something like :
> select * from table1 where title IN
> ('director','officer','chairman','accountant');
>
> Thanks all for the help.
Received on Sat Apr 14 2001 - 00:34:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US