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 from dual.

Re: Select from dual.

From: <joseharvey_at_my-deja.com>
Date: Wed, 01 Nov 2000 12:15:34 GMT
Message-ID: <8tp1h2$n0f$1@nnrp1.deja.com>

Hi Nicky,
> I've got a question. Is it possible to make a select from dual that
 returns
> mutiple rows?

well, it IS possible, try something like this: select 'Row1' test from dual union (select 'row2' from dual); TEST



Row1
row2
2 rows selected.

But dual is built just to deliver one value when you need it.

If you need a collection of rows, it is probably better to perform a query like this:
select rownum Test from all_objects where rownum < 10; TEST


         1
         2
         3
         4
         5
         6
         7
         8
         9

9 rows selected.

Cheers

Jose

--
-=[ Sancho ]=-


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Nov 01 2000 - 06:15:34 CST

Original text of this message

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