All Products
Search
Document Center

Tablestore:Delete a table

Last Updated:Aug 11, 2026

Use the Tablestore SDK for Go to delete a table that is no longer needed.

Prerequisites

Install the Tablestore SDK for Go and initialize the client.

If search indexes are created for the table, you must delete the search indexes before you can delete the table.

Description

Call DeleteTable to delete a table. A deleted table cannot be restored. The data, secondary indexes, and other resources of the table are also deleted. Proceed with caution.

func (tableStoreClient *TableStoreClient) DeleteTable(request *DeleteTableRequest) (*DeleteTableResponse, error)

The following sample deletes the example_table table.

request := &tablestore.DeleteTableRequest{
    TableName: "example_table",
}

_, err := client.DeleteTable(request)
if err != nil {
    log.Fatal(err)
}

Parameters

DeleteTableRequest contains the following parameter.

Name

Type

Description

TableName (required)

string

The table name.