Skip to main content
VeloDB Cloud 26.x·Apache Doris 4.x (≤ 4.0 supported)·"Since X.Y" tags refer to Doris versionsversion mapping →

ALTER TABLE COMMENT

Description

This statement is used to modify the comment of an existing table. The operation is synchronous, and the command returns to indicate completion.

Syntax

ALTER TABLE [database.]table alter_clause;
  1. Modify table comment

Syntax

MODIFY COMMENT "new table comment";
  1. Modify column comment

Syntax

MODIFY COLUMN col1 COMMENT "new column comment";

Example

  1. Change the table1's comment to table1_comment
ALTER TABLE table1 MODIFY COMMENT "table1_comment";
  1. Change the table1's col1 comment to table1_comment
ALTER TABLE table1 MODIFY COLUMN col1 COMMENT "table1_col1_comment";

Keywords

ALTER, TABLE, COMMENT, ALTER TABLE

Best Practice