This topic describes the DROP DATABASE statement and how to use it.
Prerequisites
Ensure the current user has the DROP privilege. For information about how to view your privileges, see View user privileges. If you do not have the DROP privilege, contact the administrator to grant it. For information about how to grant privileges, see Grant privileges directly.
Procedure
Log in to a user tenant of the cluster.
Use the
DROP DATABASEstatement to drop a database.Example:
obclient> DROP DATABASE my_db;
What to do next
If you accidentally drop a database, you can restore it using the recycle bin feature, provided that the recycle bin feature is enabled. For related operations, see Restore objects from the recycle bin.
References
For more information about the syntax of the DROP DATABASE statement, see DROP DATABASE.