List tables

Updated at:

Tablestore SDK for Java lists the names of all Wide Column model tables in the current instance.

Prerequisites

Install the Tablestore SDK for Java and initialize the client.

Function description

Call listTable to list the names of all Wide Column model tables in the current instance.

public ListTableResponse listTable() throws TableStoreException, ClientException

The following example lists all table names in the current instance and prints each name.

ListTableResponse response = client.listTable();
for (String tableName : response.getTableNames()) {
    System.out.println(tableName);
}

Parameters

listTable does not take request parameters.

Response

ListTableResponse contains the following operation-specific field.

Field

Type

Description

tableNames

List<String>

Call getTableNames() to retrieve the names of the Wide Column model tables in the current instance.