DB2 Version 10.1 for Linux, UNIX, and Windows

CREATE GLOBAL TEMPORARY TABLE and DECLARE GLOBAL TEMPORARY TABLE statements have been changed

Implicitly hidden columns in created temporary tables and declared temporary tables are not supported.

Details

You can not use the LIKE clause to create created temporary tables or declared temporary tables from a base table that contains implicitly hidden columns. An error is returned. In previous releases, you could create temporary tables with the LIKE clause specifying a base table with implicitly hidden columns.

If you use the AS (fullselect) DEFINITION ONLY clause to create created temporary tables or declared temporary tables from a base table that contains implicitly hidden columns, the new columns in the temporary table do not inherit the implicitly hidden attribute.

Resolution

Start using the AS (fullselect) DEFINITION ONLY clause instead of the LIKE clause on tables that contain implicitly hidden columns. Keep in mind that the new columns in the temporary tables will not be implicitly hidden columns. You can choose to exclude the implicitly hidden columns in the full select.

Also, modify any scripts or applications using the LIKE clause to create created temporary tables or declared temporary tables from a base table that contains implicitly hidden columns.