DB2 Delete table

Source: Internet
Author: User

DB2 table deletion is a common operation. The following describes how to delete a table in DB2 for your reference.

DB2 Delete table
You can use the drop table statement to delete a TABLE. When a table is deleted, the row containing information about the table in the SYSCAT. TABLES system directory is also deleted, and any other objects belonging to the table are affected. For example:

● All column names will be deleted

● Indexes created based on any columns of the table are deleted.

● Mark all views based on the table as unavailable

● All privileges of deleted tables and subordinate views are implicitly revoked.

● All reference constraints in the parent or subordinate tables of the table will be deleted.

● Dynamic SQL and XQuery statements from all packages and caches of the deleted table are marked as invalid and remain in this State until the dependent object is re-created. This includes some program packages from any supertables that belong to the child table of the hierarchy to be deleted

● Mark all triggers that belong to the table to be deleted as unavailable

To delete a table using the command line, enter:

Drop table <table_name>

Run the following statement to delete the DEPARTMENT table:

DROP TABLE DEPARTMENT

DB2 database commands

Four file formats for DB2 data movement

How to Implement DB2 row-to-column Conversion

Implementation of Online DB2 backup

DB2 offline backup test instance

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.