Working with created global temporary tables

You can use the workbench to create and work with created global temporary tables. Created global temporary tables hold data temporarily.

Temporary tables are especially useful when you need to sort or query intermediate result tables that contain a large number of rows, but you want to store only a small subset of those rows permanently.

Created global temporary tables are used by applications that work with data in the database, where the results from manipulation of the data need to be stored temporarily in a table. Created global temporary table information is saved in the system catalog and is not required to be defined in every session where it is used, thus making it persistent and able to be shared with other applications, across different connections.

On DB2® for Linux, UNIX, and Windows, a user temporary table space must exist before you can create a created global temporary table. On DB2 for z/OS®, a workfile database must exist before you can create a created global temporary table.

Note: Created global temporary tables are supported for DB2 for z/OS and DB2 for Linux, UNIX, and Windows data models only.

Feedback