You can call the DeleteTable operation to delete a specified table from the current instance.

Note For more information about the DeleteTable operation, see DeleteTable.


  • TableStoreClient is initialized. For more information, see Initialization.
  • A table is created.
  • The index tables and search indexes for the table are deleted.


DeleteTable(request *DeleteTableRequest) (*DeleteTableResponse, error)


Parameter Description
TableName The name of the table.


The following code provides an example on how to delete a specified table:

deleteReq := new(tablestore.DeleteTableRequest)
deleteReq.TableName = tableName
_, err := client.DeleteTable(deleteReq)
if (err != nil) {
    fmt.Println("Failed to delete table with error:", err)
} else {
    fmt.Println("Delete table finished")

For the complete sample code, visit DeleteTable@GitHub.