Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create table syntax query
"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