Oracle 9i Delete Datasheet

Source: Internet
Author: User
Tags definition sql one table
The deletion of the datasheet is simpler, the space occupied by the table after deletion is released and recycled by the system, and the deletion of the table is an operation that cannot be rolled back. Items that can be deleted include.
Data in the table's definition table
Constraints in an indexed table in a table
Permissions in the Triggers table on the table
To delete a table in Enterprise Manager
(1) as shown in Figure 7.35.
(2) The interface appears as shown in Figure 7.36.

(3) The SQL code corresponding to the above deleted data table Director is as follows.
―――――――――――――――――――――――――――――――――――――
DROP TABLE SCOTT. DIRECTOR CASCADE CONSTRAINTS;
―――――――――――――――――――――――――――――――――――――
"See CD files": \ 7th chapter \ Dropdirector.sql.
(4) The results of executing dropdirector.sql in "Sqlplus Worksheet" are shown in Figure 7.37.

Comparison of truncation and deletion
Truncate is quick to operate on all tables, and the delete operation is slower if the table is large because it produces a lot of rollback information.
Truncate is a DDL language (data definition language) that implies a commit operation and therefore cannot be rolled back.
Truncate thresholds are reset on the table or in all indexes, because all scan operations and the quick operation of the index full table will read all data blocks that do not exceed the threshold, so the performance of the full table scan after the delete operation will not improve, but the full table scan speed will be accelerated after the truncate operation.
When you truncate a table, the storage parameters for the table and all indexes can be set to the initial value, but the delete operation does not reduce the size of one table and index.
The truncation operation cannot delete the integrity constraint, and the delete operation can be deleted.


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.