DROP TABLESPACE
Description
Deletes a tablespace.
Precautions
- Only the tablespace owner or a user granted with the DROP permission can run the DROP TABLESPACE command. The system administrator has this permission by default.
- The tablespace to be deleted should not contain any database objects. Otherwise, an error will be reported.
- DROP TABLESPACE cannot be rolled back and therefore cannot be run in transaction blocks.
- During execution of DROP TABLESPACE, database queries by other sessions using \db may fail and need to be reattempted.
- If DROP TABLESPACE fails to be executed, execute DROP TABLESPACE IF EXISTS.
Syntax
DROP TABLESPACE [ IF EXISTS ] tablespace_name;
Parameters
- IF EXISTS
Reports a notice instead of an error if the specified tablespace does not exist.
- tablespace_name
Specifies the name of the tablespace to be deleted.
Value range: an existing tablespace name
Examples
See Examples in section "CREATE TABLESPACE."
Helpful Links
Suggestions
Do not delete tablespaces during transactions using DROP TABLESPACE.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot