devxlogo

Using Temp Tables in Oracle 8i

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 orTransaction basis. To create an Oracle 8i temp table use the followingsyntax:

 Create global temporary table tempTable(id number,value number);

This creates a table that is visible to all sessions, but only the dataplaced in the table is visible for the current working session. The temptable is resident until the session that created it is closed.

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

 Create global temporary table tempTable(id number,value number) on commit delete rows;
See also  How HealthStream Learning Center Supports Healthcare Education and Compliance
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist