Online Documentation for SQL Manager for DB2

Global Temporary Tables


A Global Temporary Table is a schema object that is useful for intermediate or temporary data processing. This object is available only for database server version 9.7 and higher.

 

 

Creating Global Temporary Tables

 

To create a new global temporary table:

Hint: To create a new global temporary table, you can also right-click the Global Temporary Tables node of the DB Explorer tree and select the New Global Temporary Table... context menu item.

 

To create a new global temporary table with the same properties as one of existing Global Temporary Tables has:

Alternatively, you can right-click an global temporary table in the DB Explorer tree and select the Duplicate Global Temporary Table <global temporary table_name>... context menu item.

 

Duplicate Object Wizard allows you to select the database to create a new global temporary table in, and to edit the result SQL statement for creating the global temporary table.

 

 

Editing Global Temporary Tables

 

To edit an existing global temporary table:

  • select the global temporary table for editing in the DB Explorer tree (type the first letters of the global temporary table name for quick search);
  • right-click the object and select the Edit Global Temporary Table <global temporary table_name>... context menu item, or simply double-click the global temporary table;
  • edit global temporary table definition using the appropriate tabs of Global Temporary Table Editor.

 

Dropping Global Temporary Tables

 

To drop an global temporary table:

  • select the global temporary table to drop in the DB Explorer tree;
  • right-click the object and select the Drop Global Temporary Table <global temporary table_name>... context menu item;
  • confirm dropping in the dialog window.

 

Note: If more convenient, you can also use the following shortcuts:

Ctrl+N to create a new global temporary table;

Ctrl+O to edit the selected global temporary table;

Shift+Del to drop the object from the database.