Deletes a database. This API operation cannot be used to delete data of the tables in the database.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Name String Yes db001

The name of the database that you want to delete.

Cascade Boolean Yes false

If this parameter is set to false, and the database that you want to delete has tables, the database fails to be deleted. If this parameter is set to true, and the database that you want to delete has tables, the tables are deleted first, and then the database is deleted.

Response parameters

Parameter Type Example Description

The error code returned.

Data String null

The value null indicates that no data is returned.

Message String No such database: bd001

The error message returned.

RequestId String 9BEAC206-0795-4DE3-B1FD-964BEF432B23

The ID of the request.

Success Boolean false

Indicates whether the request is successful.


Sample requests

&<Common request parameters>

Sample success responses

XML format

<Message>No such database: bd001</Message>

JSON format

    "Message": "No such database: bd001",
    "RequestId": "9BEAC206-0795-4DE3-B1FD-964BEF432B23",
    "Data": "null",
    "Code": "NO_SUCH_OBJECT",
    "Success": "false"

Error codes

For a list of error codes, visit the API Error Center.