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: Create table syntax query

Re: Create table syntax query

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 3 Jul 2002 21:04:25 GMT
Message-ID: <Xns9240EADB5DD71gnuegischgnueg@130.133.1.4>


> I need to create tables on the fly with sequential numbers from, for
> example, 500 to 40,500 in it.
>
> The table definition is
>
> CREATE TABLE tblTest(testdata NUMBER(6));
>
> Presently I am populating the table in a stored procedure using a
> LOOP. The word on the street is that I can create a table & populate
> the testdata column with the 40,000 numbers in it with a single SQL
> statement.

Not sure if you're after this sql stmt:

create table tblTest as select rownum+499 testdata from all_objects a, all_objects b, all_objects c where rownum <= 40001;

-- 
Recherchen im schweizerischen Handelsregister: 
http://www.adp-gmbh.ch/SwissCompanies/Search.php3
Received on Wed Jul 03 2002 - 16:04:25 CDT

Original text of this message

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