全部產品
Search
文件中心

Tablestore:列出資料表

更新時間:Aug 12, 2026

Go SDK 可列出當前執行個體中的所有資料表。

前提條件

安裝Tablestore Go SDK並初始化用戶端。

功能說明

調用 ListTable 查詢當前執行個體中的所有資料表名稱。該方法不需要請求參數。

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

以下樣本列出當前執行個體中的所有資料表。

response, err := client.ListTable()
if err != nil {
    log.Fatal(err)
}

for _, tableName := range response.TableNames {
    fmt.Println(tableName)
}

傳回值

ListTableResponse 包含以下商務資訊。

欄位

類型

說明

TableNames

[]string

當前執行個體中的資料表名稱列表。