DROP DATABASE

Function

DROP DATABASE deletes a database.

Important Notes

  • Be cautious when using DROP OBJECT (e.g., DATABASE, USER/ROLE, SCHEMA, TABLE, VIEW) as it may cause data loss, especially with CASCADE deletions. Always back up data before proceeding.
  • For more information about development and design specifications, see "GaussDB(DWS) Development and Design Proposal" in the Data Warehouse Service (DWS) Developer Guide.

Syntax

1
DROP DATABASE [ IF EXISTS ] database_name ;

Parameters

Examples

Delete the database named music.

1
DROP DATABASE music;

Links

CREATE DATABASE, ALTER DATABASE