All Products
Search
Document Center

Tablestore:AddDefinedColumn

Last Updated:Apr 29, 2026

Adds predefined columns to a data table. Predefined columns can be used as primary key columns or attribute columns of an index table.

Usage notes

  • Add predefined columns to a data table only when you need a secondary index. Predefined columns are not required for search indexes.

  • A data table supports up to 32 predefined columns.

Request syntax

message AddDefinedColumnRequest {
    required string table_name = 1;
    repeated DefinedColumnSchema columns = 2;
}

Parameter

Type

Required

Description

table_name

string

Yes

The name of the data table.

columns

DefinedColumnSchema

Yes

The schema of the predefined columns to add.

Response syntax

message AddDefinedColumnResponse {
}

Use Tablestore SDKs

Use the following SDKs to add predefined columns to a data table: