Online Documentation for SQL Manager for DB2

Creating/editing global temporary table


Use the Edit tab of Global Temporary Table Editor to create/edit a Global Temporary Table and specify its definition.

 

Global Temporary Table Editor - Editing Global Temporary Table Definition

 

 

Schema

Use the drop-down list to select a schema for the new Global Temporary Table.

 

Name

Enter a name for the new table. Note that the name must not identify a table, view or alias described in the catalog.

 

Tablespace

Use the drop-down list to identify the table space where the global temporary table will be created.

 

CheckBox Not logged

Enable this option to specify that insert, update, or delete operations against the table are not to be logged, but that the creation or dropping of the table is to be logged.

If the option is disabled, then insert, update, or delete operations against the table as well

as the creation or dropping of the table are to be logged. In this case the On rollback section is disabled.

 

On rollback

This section specifies the action that is to be taken on the not logged created temporary table when a ROLLBACK (or ROLLBACK TO SAVEPOINT) operation is performed.

 

RadioButton Delete rows

If the table data has been changed, all the rows will be deleted.

RadioButton Preserve rows

Rows of the table will be preserved.

 

On commit

Use this section to specify the action taken on the created temporary table when a COMMIT operation is performed. The default is DELETE ROWS.

 

RadioButton Delete rows

All rows of the table will be deleted if no WITH HOLD cursor is open on the table.

 

RadioButton Preserve rows

Rows of the table will be preserved.

 

Fields definition

Within this section you need to specify the way fields should be defined.

 

RadioButton Define manually

Fields will be defined manually within the Fields tab.

 

RadioButton From another table or view

Fields definition will be taken from the selected table or view.

 

Source schema

Select source object schema from the drop-down list.

 

Source object

Use this drop-down list to select a table or view whose field definition will be used in this global temporary table.

 

RadioButton From full select

Fields will be defined with a custom SQL query. Use the iconTools_QB Build SQL button situated on the navigation bar to create a query within Visual Query Builder or just define the query in the text area at the bottom of the window.

 

Column defaults

 

RadioButton Include

Column defaults for each updatable column of the source result table definition are copied. Columns that are not updatable will not have a default defined in the corresponding column of the created table.

 

RadioButton Exclude

Column defaults are not copied from the source result table definition.

 

Column attributes

 

RadioButton Include

If available, identity column attributes are copied from the source’s result table definition.

 

RadioButton Exclude

Identity column attributes are not copied from the source result table definition.

 

 

When you edit a global temporary table, the indexes, Triggers, Data and Dependencies tabs become available. You can see the description of this tabs in the following topics:

 

Index Editor

Trigger Editor

Working with table data

Browsing object dependencies