All Products
Search
Document Center

Tablestore:Delete a data table

Last Updated:Apr 30, 2026

This topic describes how to delete a data table in an instance using Tablestore SDK for Java.

Usage notes

  • If search indexes exist on the data table, delete the search indexes before deleting the data table.

  • Secondary indexes on the data table are automatically deleted when you delete the data table.

  • Deleted data tables and secondary indexes cannot be recovered. Proceed with caution.

Prerequisites

A client is initialized. For more information, see Initialize a Tablestore client.

Method

public DeleteTableResponse deleteTable(DeleteTableRequest deleteTableRequest) throws TableStoreException, ClientException

DeleteTableRequest parameters

  • tableName (required) String: the name of the data table to delete.

Sample code

The following example deletes a data table named test_table:

public static void deleteTableExample(SyncClient client) {
    DeleteTableRequest request = new DeleteTableRequest("test_table");
    client.deleteTable(request);
}

References

For more information, see Delete a time series table.