tencent cloud

ALTER TABLE ADD COLUMN AFTER/FIRST
最終更新日:2024-08-07 17:15:16
ALTER TABLE ADD COLUMN AFTER/FIRST
最終更新日: 2024-08-07 17:15:16

Description

Supported engines: Presto and SparkSQL
Applicable table: Native Iceberg tables and external tables
Purpose: Add column to data table.

Standard Statement

ALTER TABLE table_name ADD COLUMN column_name1 column_type [COMMENT col_comment] [FIRST|AFTER column_name2]

Parameter

table_name: Name of the target table
column_name1: Column to be added
column_type: Type of the column to be added
col_comment: Comment for the column to be added
column_name2: Column followed by the added column

Example

ALTER TABLE `TBL` ADD COLUMN `COL2` STRING COMMENT 'test' AFTER `COL1`

ALTER TABLE `TBL` ADD COLUMN `COL2` STRING COMMENT 'test' FIRST


この記事はお役に立ちましたか?
営業担当者に お問い合わせ いただくか チケットを提出 してサポートを求めることができます。
はい
いいえ

フィードバック