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: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Wed, 3 Jul 2002 13:46:54 +0100
Message-ID: <3d22f23d$0$8512$ed9e5944@reading.news.pipex.net>


"Spencer" <sburgeon_at_hotmail.com> wrote in message news:af7460c0.0207030421.11f3a4da_at_posting.google.com...
> 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.
>
> Is this right?

I don't think so. If you already have the numbers somewhere you can use CTAS. However a much more reasonable response is that you don't need to create tables on the fly. you need to populate a global temporary table.

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
Received on Wed Jul 03 2002 - 07:46:54 CDT

Original text of this message

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