You can use the DROP MAPPING TABLE
statement to delete a mapping table. You can delete multiple mapping tables at the same time.
Usage notes
The SQL query feature is supported by Tablestore SDK for Java V5.13.0 and later. When you use the SQL query feature, make sure that a supported version of Tablestore SDK for Java is installed.
For information about the version history of Tablestore SDK for Java, see Version history of Tablestore SDK for Java.
Prerequisites
A client is initialized. For more information, see Initialize a Tablestore client.
Method
public SQLQueryResponse sqlQuery(SQLQueryRequest request) throws TableStoreException, ClientException
Sample code
The following sample code provides an example on how to execute the DROP MAPPING TABLE
statement to delete a mapping table named test_table:
private static void dropMappingTable(SyncClient client) {
// Create an SQL request. If you want to delete multiple mapping tables, separate them with commas (,).
SQLQueryRequest request = new SQLQueryRequest("DROP MAPPING TABLE test_table");
// Execute the SQL request.
client.sqlQuery(request);
}