All Products
Search
Document Center

Tablestore:Delete a table

Last Updated:Nov 10, 2023

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

Note

For more information, see DeleteTable.

Prerequisites

  • An OTSClient instance is initialized. For more information, see Initialization.

  • A table is created.

  • The index tables and search indexes for the table are deleted.

Parameters

Parameter

Description

tableName

The name of the table.

Example

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

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