All Products
Search
Document Center

Tablestore:List data tables

Last Updated:Jun 24, 2025

This topic describes how to use Tablestore SDK for PHP 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 function listTable(array $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{
    $result = $client->listTable([]);        
    foreach ($result as $tableName) {
        echo "$tableName\n";
    }
} catch (Exception $e) {
    echo "Failed to list table with error.";
}