Re: Operator 'in' in a select statement

From: Muhammad A. Malik <mamalik_at_cs.wmich.edu>
Date: 1996/05/28
Message-ID: <31AB6C90.7317_at_cs.wmich.edu>#1/1


Stefano Compieta wrote:
>
> Hi,
>
> I don't know how the operator 'IN' work retrieving columns in a select
> statement . For example in the following select :
>
> SELECT col1 FROM table1 WHERE col1 IN (10,20,15,30)
>
> columns are displayed
>
> col1
> --------
> 30
> 15
> 20
> 10
>
> order is different to the order I write in the select statement .
> How I can do if I want to retrieve columns in the order I write them ?
>
> Thanks ,
>
> Stefano Compieta .

for the above query I can work it out but for large data in IN clause ....#_at_#$$

select col1 from table where col1 = 10
union
select col1 from table where col1 = 20
union
select col1 from table where col1 = 15
union
select col1 from table where col1 = 30

;-> I hope this works, as I can't check it. This university is not giving me ORACLE account.

-- 

Muhammad A. Malik
mamalik_at_cs.wmich.edu
+1 (616) 342-4569
Received on Tue May 28 1996 - 00:00:00 CEST

Original text of this message