List data tables

更新时间: 2026-01-20 21:45:04

This topic describes how to list the names of data tables in an instance using the Go software development kit (SDK).

Prerequisites

Initialize a Tablestore client

Method

func (tableStoreClient *TableStoreClient) ListTable() (*ListTableResponse, error)

Sample code

The following sample code queries the data tables in an instance and prints their names.

func ListTableSample(client *tablestore.TableStoreClient){
    tables, err := client.ListTable()
    if err != nil {
        fmt.Println("Failed to list table with error:", err)
    } else {
        for _, table := range (tables.TableNames) {
            fmt.Println(table)
        }
    }
}

References

List time series tables

上一篇: Update the table configurations 下一篇: Query information of a table
阿里云首页 表格存储 相关技术圈