dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Enterprise
Expertise: Advanced
Jul 17, 2000

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Using Temp Tables in Oracle 8i

Oracle 8i introduces the concept of temp tables. This feature long since enjoyed by SQL Server developers enables data to be visible on a Session or Transaction basis. To create an Oracle 8i temp table use the following syntax:
 Create global temporary table tempTable
(
id number,
value number
);
This creates a table that is visible to all sessions, but only the data placed in the table is visible for the current working session. The temp table is resident until the session that created it is closed.

Additionally, temp tables can be created for use on a per-transaction basis. The following syntax creates a temp table that purges all data once a transaction is committed. Or to preserve data once a transaction has been committed, use the "on commit preserve rows" syntax.

 Create global temporary table tempTable
(
id number,
value number
) on commit delete rows;
Andrew Holliday
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date