Deletes a database.

Note If you call this operation, table data in the database cannot be deleted.


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
Action String Yes DropDatabase

The operation that you want to perform. Set the value to DropDatabase.

Name String Yes db001

The name of the database that you want to delete.

Cascade Boolean Yes false

Valid values:

  • false: If tables exist in the database, the database fails to be deleted.
  • true: If tables exist in the database, tables are deleted before the database is deleted.

Response parameters

Parameter Type Example Description

The error code returned.

Data String null

The data returned. 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 was successful.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK

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

JSON format

HTTP/1.1 200 OK

  "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.