Oracle Tutorial

What is Oracle
SQL Keywords

Oracle Wildcards

Oracle Wildcards

Oracle Aliases

Oracle Aliases

MySQL Tutorial

MySQL Tutorial

PL/SQL Tutorial

PL/SQL Tutorial

Oracle Interview Questions

Oracle Interview Questions and Answers


Oracle Create and Drop Global Temporary Table

Oracle support to create a global temporary table with the help of 'GLOBAL TEMPORARY' keyword. Oracle GLOBAL TEMPORARY TABLES are distinct within modules and embedded SQL programs within Oracle sessions.

Oracle CREATE GLOBAL TEMPORARY TABLE Syntax

To create a global temporary table, use the following syntax:

Syntax

Parameters:

tablename: The temporary table name that you want to create.

column1, column2: The columns that you wish to create in the global temporary table.

Oracle CREATE GLOBAL TEMPORARY TABLE example

The following Oracle statement to create global temporary table:

Example

Note:

In the above example, we created global temporary table "tblTempCustomer".

Oracle DROP GLOBAL TEMPORARY TABLE Syntax

To remove a temporary table, use the following syntax:

Syntax

Parameters:

temptablename: The temporary table name that you want to remove.

Oracle DROP GLOBAL TEMPORARY TABLE example

The following Oracle statement to remove existing global temporary table:

Example

Note:

In the above example, we removed a global temporary table called "tblTempCustomer".