DROP DATABASE

Function

DROP DATABASE deletes a database or a schema.

Precautions

Compared with the original openGauss, Dolphin modifies the DROP DATABASE syntax as follows:

  • The DATABASE can be parsed as SCHEMA.

Syntax

DROP DATABASE [ IF EXISTS ] database_name ;

Parameter Description

  • IF EXISTS

    Reports a notice instead of an error if the specified database does not exist.

  • database_name

    Specifies the name of the database to be deleted.

    Value range: an existing database name

    NOTE:

    • In B-compatible mode, when dolphin.b_compatibility_mode is set to on, the syntax is the same as the DROP SCHEMA syntax without dolphin. If dolphin.b_compatibility_mode is off, the syntax is the DROP DATABASE syntax without dolphin.

Examples

See Examples in CREATE DATABASE.

Helpful Links

CREATE DATABASE, DROP DATABASE

Feedback
编组 3备份
    openGauss 2024-05-19 00:42:09
    cancel