Create temporary table DB2 supports created global temporary tables in addition to declared global temporary tables.
CREATE TEMPORARY TABLE除了声明全局临时表之外,DB 2还支持创建全局临时表。
Then for that database, a user can be granted the CREATE TEMPORARY TABLES privilege, along with any other privileges required for temporary table operations done by that user.
然后对于该数据库,可以向用户授予CREATE TEMPORARY TABLES权限以及该用户执行的临时表操作所需的任何其他权限。
You should create one or more USER temporary table spaces for storing data of temporary tables.
您应当创建一个或多个USER临时表空间来存储临时表的数据。
The script below shows an example, which you can modify to create a user temporary table space in your environment.
下面的脚本给出了一个例子,我们可以对其进行更改,从而在自己的环境中创建一个用户临时表空间。
Create a user temporary table space for use by the global temporary table.
创建一个用作全局临时表的用户表空间。
It is best to create user temporary table space from the system one.
最好从系统临时表空间创建用户临时表空间。
Table Spaces that you create in DSNDB07 will be used as storage for processing SQL joins and sorts as well as for temporary tables.
您在DSNDB07创建的表空间将用作处理SQL联接和排序以及临时表的存储。
Listing 2 creates a public alias for the newly create global temporary table so that it can be referred to as gtt_test without having to qualify the table name.
清单2将为新创建的全局临时表创建一个公有别名,以便于可以使用gtt _ test来引用它,而不需要限定表名。
Step 1: In Development Center, create a procedure called init_temp() to encapsulate the declaration of the temporary table session.temp.
步骤1:在DevelopmentCenter 中,创建名为 init_temp()的过程来封装临时表session.temp 的声明。
Step 2: In Development Center, create the procedure close_temp which drops the temporary table session.temp.
步骤2:在DevelopmentCenter中,创建过程close_temp来删除临时表session . temp。
Step3: Create the procedure count_rows which returns the number of rows found in the temporary table.
步骤3:创建count_rows过程,返回在临时表中找到的行数。
Recall that in order to use temporary tables, a user temporary table space must exist in the database (none exists by default). Here's how you would create such a table space.
我们记得为了要使用临时表,数据库中必须存在一个用户临时表空间(默认情况下没有)。
Recall that in order to use temporary tables, a user temporary table space must exist in the database (none exists by default). Here's how you would create such a table space.
我们记得为了要使用临时表,数据库中必须存在一个用户临时表空间(默认情况下没有)。
应用推荐