All Products
Search
Document Center

Tablestore:Overview

Last Updated:Sep 05, 2023

This topic describes the operations that you can perform by executing SQL statements in Tablestore SDK for Java.

Important

Tablestore SDK for Java V5.13.0 and later support the SQL query feature. Before you use the SQL query feature, make sure that Tablestore SDK for Java V5.13.0 or later is installed. For more information about the version history of Tablestore SDK for Java, see Version history of Tablestore SDK for Java.

Operation

Description

Create mapping tables for tables

You can execute the CREATE TABLE statement to create tables and mapping tables. If the table for which you want to create a mapping table exists, only the mapping table for the table is created. If the table for which you want to create a mapping table does not exist, a table and a mapping table with the specified name are created.

Important

In the latest version, the CREATE TABLE statement can only create mapping tables for existing tables but cannot create tables.

Delete mapping tables

You can execute the DROP MAPPING TABLE statement to delete mapping tables that are created for tables.

List the names of tables

You can execute the SHOW TABLES statement to list the names of tables in the current database.

Query information about tables

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

Query the index information about tables

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

Query data in tables

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.