Declare Global Temporary Table Statement
Creates a temporary table.
Syntax:
declare global temporary table session.table_name
(column_name format{, column_name format})
[withclause];
To create a temporary table by selecting data from another table:
declare global temporary table session.table_name
(column_name{, column_name})
as subselect
[withclause];
Valid parameters for the with clause are:
location = (locationname{, locationname})
[no]duplicates
allocation=initial_pages_to_allocate
extend=number_of_pages_to_extend
For temporary tables created using a subselect, the following additional parameters can be specified in the with clause:
structure = hash | heap | isam | btree
key = (columnlist)
fillfactor = n
minpages = n
maxpages = n
leaffill = n
nonleaffill = n
compression[ = ([[no]key][,[no]data])] | nocompression
page_size = n
You must specify multiple with clause parameters as a comma-separated list. To delete a temporary table, use the drop table statement.
The session table owner is required for the declare global temporary table session statement; you cannot omit these keywords.
Last modified date: 06/25/2024