You can execute the show tables statement to list the names of tables in the current instance.

Note For more information about the show tables statement, see List table names.

Prerequisites

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.

$request = array(
    'query' => "SHOW TABLES;",
);
$response = $this->otsClient->sqlQuery ($request);
$sqlRows = $response['sql_rows'];
print json_encode($sqlRows, JSON_PRETTY_PRINT);