You can execute the show tables statement to list the names of tables in the current database.
Note For more information about the show tables statement, see List table names.
Prerequisites
- A Tablestore client is initialized. For more information, see Initialization.
- A mapping table is created. For more information, see Create mapping tables.
Parameters
Parameter | Description |
---|---|
query | The SQL statement. Configure the parameter based on the required feature. |
Examples
Execute the show tables
statement to list the names of tables.
const params = {
query: "show tables",
}
client.sqlQuery(params, function (err, data) {
if (err) {
console.log('sqlQuery error:', err.toString());
} else {
console.log('sqlQuery success:', data);
}
});