This topic describes how to perform SQL queries by using Tablestore SDK for .NET.
Usage notes
Tablestore SDK for .NET V5.0.0 or later supports SQL queries. To perform SQL queries by using Tablestore SDK for .NET, make sure that your SDK version is 5.0.0 or later. We recommend that you use the latest SDK. For more information, see Version history of Tablestore SDK for .NET.
Procedure
You must use the following steps to perform SQL queries.
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 more information, see Create a mapping table.
You can manage mapping tables based on your actual requirements. The following table describes the mapping management operations that you can perform.
Operation
Description
You can execute the ALTER TABLE statement to add an attribute column to the mapping table or remove 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.