How to create a "Created temporary table" in DB2 ITEMS with columns - ID, Name, Quantity and description. Explain the purpose of "Created temporary table"?

DB2DatabaseBig Data Analytics

The Created temporary tables are non-permanent DB2 tables that exist as long as the process using this table is active. For example any batch program. The created temporary tables are best suited for the sequential access and hence system performance is not a concern over here.

The created temporary tables can be created using the DDL statement CREATE GLOBAL TEMPORARY TABLE followed by the name of the temporary table. This statement makes the entry of the new table in DB2 system table SYSIBM.SYSTABLES with type column as ‘G’.

The created temporary table should always be created using the above DDL statement before it can be accessed by any program. In addition to this the indexes and constraints cannot be defined on them.

raja
Published on 12-Sep-2020 18:20:28
Advertisements