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: Frank van Bortel <fbortel_at_home.nl>
Date: Wed, 01 Nov 2000 18:49:24 GMT
Message-ID: <3A004730.CA6511FA@home.nl>

Just want to add to this solution:
*dont*, and I mean DONT! ever add extra extries in dual! You may consider creating your own trivial table, and code like select * from trivial; but stay away from dual!

joseharvey_at_my-deja.com wrote:

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

--
Gtrz,

Frank van Bortel
Received on Wed Nov 01 2000 - 12:49:24 CST

Original text of this message

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