Considerations for using the DB2 database temporary tables

Source: Internet
Author: User
Tags db2

When using a temporary table for DB2, the following points need to be noted:

1. DB2 temporary tables need to be created using the command declare temporary table and need to be created on the user temporary tablespace;

2. DB2 when the database is created, the user temporary table space is not created by default, and if a temporary table is needed, the user is required to create a temporary table space before the temporary table is created;

3. The model of the temporary table is session;

4. By default, all records in a temporary table are deleted when the commit command is executed; This can be controlled by specifying different parameters when creating a temporary table;

5. When running the rollback command, the user temporary table will be deleted;

6. In DB2 version 8, you can log records on temporary tables.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.