This topic describes the operations that are supported for Tablestore SDK for Node.js by executing SQL statements.
Usage notes
Tablestore SDK for Node.js V5.2.0 or later supports the SQL query feature. Before you use the SQL query feature, make sure that Tablestore SDK for Node.js V5.2.0 or later is obtained. For more information about the version history of Tablestore SDK for Node.js, see Version history of Tablestore SDK for Node.js.
Procedure
To use the SQL query feature to query data, perform the following steps.
This topic describes how to execute SQL statements to perform operations on data in a data table. For information about how to execute SQL statements to perform operations on data in a time series table, see Use SQL to query time series data.
Create a mapping table for the table. For more information, see Create mapping tables.
After you create a mapping table, you can manage the mapping table as needed.
Operation
Description
You can execute the ALTER TABLE statement to add an attribute column to an existing mapping table or delete an attribute column from the mapping table.
You can execute the SHOW TABLES statement to query the names of tables in the current database.
You can execute the DESCRIBE statement to query the information about tables, such as the field names and field types.
You can execute the SHOW INDEX statement to query the index information about tables.
You can execute the DROP MAPPING TABLE statement to delete mapping tables that are created for tables.
Execute SELECT statements to query data. For more information, see Query data.
FAQ
References
For information about the SQL query feature, see SQL query.
For information about the API operation that you can call to use the SQL query feature, see SQLQuery.
You can also use computing engines, such as MaxCompute, Spark, Hive, HadoopMR, Function Compute, Flink, and PrestoDB, to compute and analyze data in tables. For more information, see Overview.