forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
34 lines
2.5 KiB
HTML
34 lines
2.5 KiB
HTML
<a name="EN-US_TOPIC_0000001772696176"></a><a name="EN-US_TOPIC_0000001772696176"></a>
|
|
|
|
<h1 class="topictitle1">COMMENT</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001772696176__en-us_topic_0000001658024870_en-us_topic_0000001436175729_en-us_topic_0214164629_p781310512108">In MySQL, <strong id="EN-US_TOPIC_0000001772696176__en-us_topic_0000001658024870_en-us_topic_0000001436175729_b124908102831644">COMMENT</strong> 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.</p>
|
|
<p id="EN-US_TOPIC_0000001772696176__en-us_topic_0000001658024870_en-us_topic_0000001436175729_en-us_topic_0214164629_p659017367411"><strong id="EN-US_TOPIC_0000001772696176__en-us_topic_0000001658024870_en-us_topic_0000001436175729_en-us_topic_0214164629_b594718313141">Input</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696176__en-us_topic_0000001658024870_en-us_topic_0000001436175729_en-us_topic_0214164629_screen260412397186">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';</pre>
|
|
<p id="EN-US_TOPIC_0000001772696176__en-us_topic_0000001658024870_en-us_topic_0000001436175729_en-us_topic_0214164629_p12114173518210"><strong id="EN-US_TOPIC_0000001772696176__en-us_topic_0000001658024870_en-us_topic_0000001436175729_en-us_topic_0214164629_b1871046151416">Output</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696176__en-us_topic_0000001658024870_en-us_topic_0000001436175729_en-us_topic_0214164629_screen489081782010">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';</pre>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0119.html">Table (Optional Parameters and Operations)</a></div>
|
|
</div>
|
|
</div>
|
|
|