Updated on 2024-11-29 GMT+08:00

ALTER ADD COLUMNS

Function

This command is used to add columns to an existing table.

Syntax

ALTER TABLE tableIdentifier ADD COLUMNS(colAndType (,colAndType)*)

Parameter Description

Table 1 Parameters

Parameter

Description

tableIdentifier

Table name.

colAndType

Name of a comma-separated column with data types and optional default values. A column name consists of letters, digits, and underscores (_).

Examples

alter table h0_1 add columns(ext0 string);
alter table h0_1 add columns(ext1 string default 'ext1_default_value');

System Response

The columns are added to the table. You can run the DESCRIBE command to display the columns.