Use of DB2 TRUNCATE

Source: Internet
Author: User

DB2 TRUNCATE is used in DB2. There are two common methods to quickly clear data in a TABLE: alter table O_LNB_SM_USERINFO activate not logged initially with empty table; delete the table O_LNB_SM_USERINFO without logging the second import from 'empty file' of ixf messages log1.txt replace into test. replace the data in the original table with an empty file but starting from V9.7, DB2 supports TRUNCATE to quickly clear the table data Syntax :. -TABLE -.. -drop storage --.> -TRUNCATE -- + ------- + -- table-name -- + --------------- + -----------> '-reuse storage -'. -IGNORE DELETE TRIGGERS --------.> -- + ------------------------------- + ----------------------------> '-restrict when delete triggers -'. -continue identity-.> -- + ------------------- + -- IMMEDIATE ----------------------------> <drop storage: immediately releases the Data Page reuse storage: After the data is cleared, DBM manages to release the data page. Wait a moment.

Related Article

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.