DROP DATABASE
Description
In M-compatible databases, DATABASE and SCHEMA are synonyms. Deleting a database is deleting a schema.
Precautions
- Only the database owner or a user granted with the DROP permission can run the DROP DATABASE command. The system administrator has this permission by default.
- Users except the initial user and O&M administrator cannot drop the database of the O&M administrator.
- DROP DATABASE cannot be undone.
- Schemas beginning with pg_temp or pg_toast_temp are for internal use. Do not delete them. Otherwise, unexpected consequences may be incurred.
Syntax
DROP DATABASE [ IF EXISTS ] database_name;
Parameters
- IF EXISTS
Reports a notice instead of an error if the specified database or schema does not exist.
- database_name
Specifies the name of the database or schema to be deleted.
Value range: an existing database name
Examples
See Examples in section "CREATE DATABASE."
Helpful Links
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