All Products
Search
Document Center

Tablestore:SQL query

Last Updated:Mar 31, 2025

This topic describes the SQL query operations that are supported by Tablestore SDK for Go.

Usage notes

Before you use the SQL query feature, we recommend that you install the latest version of Tablestore SDK for Go.

Features

Operation

Description

Create a mapping table

You can execute the CREATE TABLE statement to create a mapping table for an existing table or a search index.

Update attribute columns of a mapping table

You can execute the ALTER TABLE statement to add or remove attribute columns for an existing mapping table.

Delete mapping tables

You can execute the DROP MAPPING TABLE statement to delete mapping tables.

Query the names of mapping tables

You can execute the SHOW TABLES statement to query mapping tables in the current database.

Query information about a table

You can execute the DESCRIBE statement to query information about a table, such as the field names and field types.

Query index information about tables

You can execute the SHOW INDEX statement to query index information about a table.

Query data

You can execute the SELECT statement to query data in a table.

After an SQL statement returns the datetime data, date data, and time data, you can call corresponding API operations to query the data based on your requirements. For more information, see Query the date and time data.