Home » SQL & PL/SQL » SQL & PL/SQL » Create a temp table from an existing table
Create a temp table from an existing table [message #238586] Fri, 18 May 2007 11:33 Go to next message
concorde800
Messages: 52
Registered: May 2007
Member
Please could you tell me how a temp table is created??

I am using SQL NAV 5.0. The oracle DB is 9i.

Thank you.
Re: Create a temp table from an existing table [message #238601 is a reply to message #238586] Fri, 18 May 2007 12:25 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Hi

Here U Go

SQL> create global temporary table test1
2 as
3 select * from user_tables;

Table created.

SQL> create global temporary table test on commit preserve rows
2 as
3 select * from dba_users;

Table created.
Re: Create a temp table from an existing table [message #238603 is a reply to message #238586] Fri, 18 May 2007 12:26 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
Almost without exception, temporary tables are NOT needed in Oracle.
When they are needed you should research Global Temporary Table (GTT).

Is Google broken for you today?
Re: Create a temp table from an existing table [message #238981 is a reply to message #238603] Mon, 21 May 2007 02:01 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
And, if you're coming from a SQL Server background, you don't need temporary tables in Oracle the same way that you do in SQL Server.
Previous Topic: Functions
Next Topic: data recovery in oracle
Goto Forum:
  


Current Time: Fri Dec 02 18:46:49 CST 2016

Total time taken to generate the page: 0.39526 seconds