Re: simulating a select returning a million rows?

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 31 May 2009 18:48:42 -0700
Message-ID: <4a23337a$1_at_news.victoria.tc.ca>



mh_at_pixar.com wrote:
: I have a table that has 1 million rows populated with number 1..1000000.

: create table foo(x number);

: I use this for testing our various client software.

: select * from foo order by x;

: Is there a way I can get the same select results
: without having to pre-populate a table?

: This was all I could think of which works
: but might not scale... :-)

: select 1 from dual union select 2 from dual union ...;

: many TIA!
: Mark

If I repeat myself then sorry all, I thought I posted this a few momoent ago but it vanished from my screen.

Try something like         

        select rownum from dual connect by rownum <= 1000000

If that doesn't work (I can't test it right now) then be aware that something like that does indeed work, google probably has working examples. Received on Sun May 31 2009 - 20:48:42 CDT

Original text of this message