Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create table syntax query
> 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.php3Received on Wed Jul 03 2002 - 16:04:25 CDT