Help Center/ Data Warehouse Service/ Tool Guide/ DSC/ MySQL Syntax Migrating/ Table (Optional Parameters and Operations)/ COMMENT
Updated on 2025-04-10 GMT+08:00
COMMENT
In MySQL, COMMENT is a comment for a table. In GaussDB(DWS), this attribute can be used to modify table definition. During migration using DSC, additional table attribute information is added.
Input
1 2 3 4 5 6 7 8 | CREATE TABLE `public`.`runoob_alter_test`( `dataType1` int NOT NULL AUTO_INCREMENT, `dataType2` FLOAT (10,2) COMMENT'dataType2 column', PRIMARY KEY(`dataType1`) ) comment='table comment'; ALTER TABLE `public`.`runoob_alter_test` COMMENT 'table comment after modification'; ALTER TABLE `public`.`runoob_alter_test` ADD INDEX age_index(dataType2) COMMENT' index'; |
Output
1 2 3 4 5 6 7 8 9 10 11 12 | CREATE TABLE "public"."runoob_alter_test" ( "datatype1" SERIAL NOT NULL, "datatype2" REAL COMMENT 'dataType2 column', PRIMARY KEY ("datatype1") ) WITH ( ORIENTATION = ROW, COMPRESSION = NO ) NOCOMPRESS DISTRIBUTE BY HASH ("datatype1") COMMENT 'Comment of the table'; ALTER TABLE `public`.`runoob_alter_test` COMMENT 'table comment after modification'; CREATE INDEX "age_index" ON "public"."runoob_alter_test" ("dataType2") COMMENT' index'; |
Parent topic: Table (Optional Parameters and Operations)
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.