Delete a mapping table

Updated at:

Tablestore SDK for Java deletes one or more mapping tables in a single SQL request.

Prerequisites

Description

Call the sqlQuery method to execute a DROP MAPPING TABLE statement and delete one or more mapping tables. To delete multiple mapping tables, separate the mapping table names with commas (,).

SQLQueryResponse sqlQuery(SQLQueryRequest request)
Important

Deleting a mapping table deletes only the SQL mapping and does not delete the associated data table or search index.

The following example deletes the example_table and example_search_index_mapping mapping tables.

SQLQueryRequest request = new SQLQueryRequest(
        "DROP MAPPING TABLE example_table, example_search_index_mapping");
client.sqlQuery(request);

Parameters

SQLQueryRequest contains the following parameter.

Name

Type

Description

query (required)

String

The DROP MAPPING TABLE statement to execute. You can specify one or more mapping table names.