Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: CREATE GLOBAL TEMPORARY TABLE AS SELECT * FROM.....

Re: CREATE GLOBAL TEMPORARY TABLE AS SELECT * FROM.....

From: Thomas Gaines <Thomas.Gaines_at_noaa.gov>
Date: Tue, 28 May 2002 11:06:26 -0600
Message-ID: <3CF3B912.68BD9982@noaa.gov>


Andrew -

Yes, it's certainly possible. Try something like this:

SQL> create global temporary table emp100 on commit

    preserve rows as select * from emp;

It worked like a charm for me on version 8.1.7.2.

TG

Andrew Tindle wrote:

> Hi,
>
> I'm trying to create a temporary table using the 'CREATE GLOBAL
> TEMPORARY TABLE AS SELECT <col1>,<col2>.... FROM <tab1>......' syntax.
>
> Can anyone tell me if it's possible to extend this syntax so that the
> table keeps the data for the session, not just the transaction; i.e
> replicate the 'ON COMMIT PRESERVE ROWS' clause that would be used if
> creating the temp table with the explicit columns defined.
>
> TIA
>
> Andrew
Received on Tue May 28 2002 - 12:06:26 CDT

Original text of this message

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