Predefined columns are non-primary key columns that are predefined with specific data types. This topic describes how to use predefined columns.

Important By default, a data table can contain a maximum of 32 predefined columns. To increase the number of predefined columns, submit a ticket.
If you want to use a search index for a data table, you do not need to add predefined columns to the data table. If you want to use a secondary index for a data table, you must add predefined columns to the data table by using the following methods:

After you add a predefined column to a data table, you can use the predefined column as a primary key column or attribute column of the secondary index. You must use one or more of the predefined columns as the attribute columns of the secondary index.

For example, if a data table contains three primary key columns, two predefined columns, and two attribute columns, you can create a secondary index with the following attributes. The three primary key columns can only be used as the primary key columns of the secondary index, the two predefined columns can be used as the primary key columns or attribute columns of the secondary index, and the two attribute columns cannot be used for the secondary index.