All Products
Search
Document Center

Tablestore:Delete a table

Last Updated:Aug 16, 2024

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

Usage notes

  • You cannot restore deleted data tables. Proceed with caution.

  • When you delete a data table, the data in the data table and the secondary indexes that are created for the data table are deleted. You cannot restore deleted data or secondary indexes. Proceed with caution.

Prerequisites

Parameters

Parameter

Description

tableName

The name of the data table.

Examples

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

private static void deleteTable(SyncClient client) {
    // Specify the name of the data table. 
    DeleteTableRequest request = new DeleteTableRequest("<TABLE_NAME>");
    client.deleteTable(request);
}

References

  • For more information about the API operation, see DeleteTable. For the complete sample code, visit DeleteTable@GitHub.

  • If an error occurs when you call this operation, search for the error cause in Error codes based on the error message and troubleshoot the error.