All Products
Search
Document Center

Tablestore:List data tables

Last Updated:Jun 26, 2025

This topic describes how to use Tablestore SDK for .NET to list the names of data tables in a Tablestore instance.

Prerequisites

A client is initialized. For more information, see Initialize a Tablestore client.

Method description

public ListTableResponse ListTable(ListTableRequest request)

Asynchronous method:

public Task<ListTableResponse> ListTableAsync(ListTableRequest request)

Sample code

The following sample code demonstrates how to query the list of data tables in an instance and print the table names.

try
{
    ListTableRequest request = new ListTableRequest();
    ListTableResponse response = client.ListTable(request);
    foreach (var tableName in response.TableNames)
    {
        Console.WriteLine(tableName);
    }
}
catch (Exception ex)
{
    Console.WriteLine($"Describe table failed, exception:{ex.Message}");
}