All Products
Search
Document Center

Tablestore:Delete a mapping table

Last Updated:Apr 28, 2025

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 PHP V5.1.0 and later. When you use the SQL query feature, make sure that a supported version of Tablestore SDK for PHP is installed.

For information about the version history of Tablestore SDK for PHP, see Version history of Tablestore SDK for PHP.

Prerequisites

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

Method

public function sqlQuery(array $request)

Parameters

request (required): the SQL statement to execute.

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:

$request = array(
    'query' => 'DROP MAPPING TABLE `test_table`;'
);
$response = $otsClient->sqlQuery($request);
print json_encode($response, JSON_PRETTY_PRINT);