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

Home -> Community -> Usenet -> c.d.o.server -> Re: Select multiple rows from DUAL ?

Re: Select multiple rows from DUAL ?

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: 9 Jan 2005 13:09:12 -0800
Message-ID: <1105304952.210636.185290@c13g2000cwb.googlegroups.com>


Anurag Varma wrote:
> The simple way which Serge hints to:
>
> ORA92> create type myarray as table of number;
> 2 /
>
> Type created.
>
> ORA92> select * from table(myarray(1,2,3,4));
>
> COLUMN_VALUE
> ------------
> 1
> 2
> 3
> 4

I wonder if this would be a nice, acceptable way of getting rid of the final consistent gets from DUAL?

As in:

...>select user,sysdate from table(myarray(10)); Press Return to continue...

USER                           SYSDATE
------------------------------ --------------------
MIGR_USER                      2005-JAN-10 08:06:43

Elapsed: 00:00:00.09

Statistics



0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
373 bytes sent via SQL*Net to client
495 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)

          1 rows processed

...>
;) Received on Sun Jan 09 2005 - 15:09:12 CST

Original text of this message

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