In Oracle, you can use the "drop tablespace" statement to clear the table space, the syntax is "drop tablespace tab_name [including contents][cascade constraints]".
The operating environment of this tutorial: Windows 7 system, Oracle 11g version, Dell G3 computer.
oracle clears table space
Oracle’s operation of deleting table space often occurs when part of the database business is split, which will cause unnecessary Delete the table space and corresponding data files to release the hardware space of the current database.
Deleting a table space can be done directly through OEM enterprise management or SQL commands. When Oracle deletes a table space, it is not necessary to delete the data files first and then delete the table space. You can choose to delete the data files together when deleting the table space.
Oracle delete tablespace syntax structure:
drop tablespace tab_name [including contents][cascade constraints]
Syntax analysis:
drop tablespace
: Delete the keyword of the table space, tab_name represents the name of the table space.
[including contents]
: Indicates that when deleting the table space, delete the data files in the table space together.
[cascade constraints]
: Indicates that when the table space is deleted, the integrity of the table space is also deleted. For example, the foreign keys of the table, triggers, etc. are the integrity constraints of the table.
Case, delete the student table space, and delete the data files and integrity of the table space
drop tablespace student including contents cascade constraints;
Check the table space again and find that The student tablespace no longer exists, as shown below:
## Recommended tutorial: "Oracle Tutorial"
The above is the detailed content of How to clear oracle table space. For more information, please follow other related articles on the PHP Chinese website!