1.1.1

Table Of Contents
Temporary tables cannot be specied in referential constraints and primary keys
Temporary tables cannot be referenced in a triggered-SQL-statement
Check constraints on columns
Generated-column-spec
Importing into temporary tables
If a statement that performs an insert, update, or delete to the temporary table encounters an error, all the rows
of the temporary table are deleted.
The following data types cannot be used with Declared Global Temporary Tables:
BLOB
CHAR FOR BIT DATA
CLOB
LONG VARCHAR
LONG VARCHAR FOR BIT DATA
VARCHAR FOR BIT DATA
XML
The following is a list of DB2 UDB DECLARE GLOBAL TEMPORARY TABLE functions that are not
supported by SQLFire:
IDENTITY column-options
IDENTITY attribute in copy-options
AS (fullselect) DEFINITION ONLY
NOT LOGGED ON ROLLBACK PRESERVE ROWS
IN tablespace-name
PARTITIONING KEY
WITH REPLACE
Example
set schema testSchema;
create table test (col1 int, col2 varchar(100));
-- The SESSION qualification is redundant here because
temporary
-- tables can only exist in the SESSION schema.
declare global temporary table SESSION.test_temp(col1 int)
not logged;
-- The temporary table is not qualified here with SESSION
because temporary
-- tables can only exist in the SESSION schema.
declare global temporary table check2(col2 int) not logged;
-- SESSION qualification is mandatory here if you want to use
-- the temporary table, because the current schema is
"testSchema"
insert into SESSION.test_temp values (1);
-- This select statement is referencing the
"testSchema.test_temp" physical
-- table since the table was not qualified by SESSION.
select * from test_temp;
vFabric SQLFire User's Guide514
vFabric SQLFire Reference