{"id":1739,"date":"2020-09-30T11:09:09","date_gmt":"2020-09-30T03:09:09","guid":{"rendered":"https:\/\/www.gbase8.cn\/?p=1739"},"modified":"2020-09-30T11:17:29","modified_gmt":"2020-09-30T03:17:29","slug":"gbase-8a%e7%9a%84%e6%b3%a8%e9%87%8acomment-%e5%8a%9f%e8%83%bd%e4%bb%8b%e7%bb%8d%ef%bc%8c%e6%9b%b4%e6%96%b0%e6%b3%a8%e9%87%8a%e7%9a%84%e6%96%b9%e6%b3%95%ef%bc%8c%e6%9c%80%e5%a4%a7%e9%95%bf%e5%ba%a6","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/1739","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u7684\u6ce8\u91cacomment \u529f\u80fd\u4ecb\u7ecd\uff0c\u66f4\u65b0\u6ce8\u91ca\u7684\u65b9\u6cd5\uff0c\u6700\u5927\u957f\u5ea6\u9650\u5236"},"content":{"rendered":"<p>GBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\u652f\u6301\u8868\u7684\u6ce8\u91cacomment&nbsp;\uff0c\u5b57\u6bb5\u7684\u6ce8\u91ca\uff0c\u672c\u6587\u4ecb\u7ecd\u8868\u521b\u5efa\u65f6\u7684\u6ce8\u91ca\u4ee5\u53ca\u8868\u6ce8\u91ca\u548c\u5b57\u6bb5\u6ce8\u91ca\u7684\u88c5\u4fee\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2aea58531ae\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2aea58531ae\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/1739\/#%E5%BB%BA%E8%A1%A8\" >\u5efa\u8868<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/1739\/#%E6%9B%B4%E6%94%B9%E8%A1%A8%E6%B3%A8%E9%87%8A\" >\u66f4\u6539\u8868\u6ce8\u91ca<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/1739\/#%E6%9B%B4%E6%94%B9%E5%88%97%E6%B3%A8%E9%87%8A\" >\u66f4\u6539\u5217\u6ce8\u91ca<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/1739\/#%E6%B7%BB%E5%8A%A0%E6%B3%A8%E9%87%8A\" >\u6dfb\u52a0\u6ce8\u91ca<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%BB%BA%E8%A1%A8\"><\/span>\u5efa\u8868<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5728\u5efa\u8868\u8bed\u53e5\u91cc\uff0c\u76f4\u63a5\u5728\u5b57\u6bb5\u548c\u8868\u5b9a\u4e49\u540e\u9762\uff0c\u52a0\u4e0acomment \u5173\u952e\u5b57\uff0c\u540e\u9762\u52a0\u4e0a\u5b57\u7b26\u4e32\u5373\u53ef\u3002<\/p>\n\n\n\n<p>\u6839\u636e\u73b0\u6709\u89c4\u5b9a\uff0ccomment\u7684\u6700\u5927\u957f\u5ea6\u662f2000\u4e2a\u5b57\u7b26\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> create table testcomment(id int comment '\u7f16\u53f7', name varchar(100) comment '\u59d3\u540d') comment '\u6d4b\u8bd5\u6ce8\u91ca';\nQuery OK, 0 rows affected (Elapsed: 00:00:00.29)\n\ngbase> show create table testcomment;\n+-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Table       | Create Table                                                                                                                                                                                                            |\n+-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| testcomment | CREATE TABLE \"testcomment\" (\n  \"id\" int(11) DEFAULT NULL COMMENT '\u7f16\u53f7',\n  \"name\" varchar(100) DEFAULT NULL COMMENT '\u59d3\u540d'\n) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' COMMENT='\u6d4b\u8bd5\u6ce8\u91ca'         |\n+-------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase>\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9B%B4%E6%94%B9%E8%A1%A8%E6%B3%A8%E9%87%8A\"><\/span>\u66f4\u6539\u8868\u6ce8\u91ca<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u7528alter table TABLENAME comment '\u65b0\u7684\u6ce8\u91ca\u5185\u5bb9\u2019\u5bf9\u8868\u7684\u6ce8\u91ca\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> alter table testcomment comment '\u6d4b\u8bd5\u8868\u6ce8\u91ca\u4fee\u6539';\nQuery OK, 0 rows affected (Elapsed: 00:00:00.12)\n\ngbase> show create table testcomment;\n+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Table       | Create Table                                                                                                                                                                                                                     |\n+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| testcomment | CREATE TABLE \"testcomment\" (\n  \"id\" int(11) DEFAULT NULL COMMENT '\u7f16\u53f7',\n  \"name\" varchar(100) DEFAULT NULL COMMENT '\u59d3\u540d'\n) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' COMMENT='\u6d4b\u8bd5\u8868\u6ce8\u91ca\u4fee\u6539'            |\n+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9B%B4%E6%94%B9%E5%88%97%E6%B3%A8%E9%87%8A\"><\/span>\u66f4\u6539\u5217\u6ce8\u91ca<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u7528alter table TABLENAME modify \u5217\u540d\u5b57 \u5217\u5b9a\u4e49 comment\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n\n\n\n<p>\u6ce8\u610f\u5217\u7684\u539f\u6709\u5b9a\u4e49\u8981\u4fdd\u6301\uff0c\u5305\u62ec\u7c7b\u578b\uff0cNOT NULL\uff0c default\u7b49\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> alter table testcomment  modify id int comment '\u6d4b\u8bd5\u7f16\u53f7\u4fee\u6539';\nQuery OK, 0 rows affected (Elapsed: 00:00:00.14)\nRecords: 0  Duplicates: 0  Warnings: 0\n\ngbase> show create table testcomment;\n+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Table       | Create Table                                                                                                                                                                                                                                 |\n+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| testcomment | CREATE TABLE \"testcomment\" (\n  \"id\" int(11) DEFAULT NULL COMMENT '\u6d4b\u8bd5\u7f16\u53f7\u4fee\u6539',\n  \"name\" varchar(100) DEFAULT NULL COMMENT '\u59d3\u540d'\n) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' COMMENT='\u6d4b\u8bd5\u8868\u6ce8\u91ca\u4fee\u6539'                |\n+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%B7%BB%E5%8A%A0%E6%B3%A8%E9%87%8A\"><\/span> \u6dfb\u52a0\u6ce8\u91ca<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p> \u6dfb\u52a0\u6ce8\u91ca\u548c\u4fee\u6539\u5b9a\u65f6\u5b8c\u5168\u4e00\u6837\u7684\u64cd\u4f5c\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gbase> desc t1;\n+-------+----------+------+-----+---------+-------+\n| Field | Type     | Null | Key | Default | Extra |\n+-------+----------+------+-----+---------+-------+\n| id    | int(11)  | YES  | MUL | NULL    |       |\n| value | int(11)  | YES  |     | NULL    |       |\n| birth | datetime | YES  |     | NULL    |       |\n+-------+----------+------+-----+---------+-------+\n3 rows in set (Elapsed: 00:00:00.01)\n\ngbase> alter table t1 comment '\u6dfb\u52a0\u6570\u503c';\nQuery OK, 0 rows affected (Elapsed: 00:00:00.15)\n\ngbase> show create table t1;\n+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Table | Create Table                                                                                                                                                                                                                                                           |\n+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| t1    | CREATE TABLE \"t1\" (\n  \"id\" int(11) DEFAULT NULL,\n  \"value\" int(11) DEFAULT NULL,\n  \"birth\" datetime DEFAULT NULL,\n  KEY \"idx_id\" (\"id\") KEY_BLOCK_SIZE=4096 USING HASH GLOBAL\n) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' COMMENT='\u6dfb\u52a0\u6570\u503c'     |\n+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n\ngbase> alter table t1 modify id int comment '\u6dfb\u52a0\u6ce8\u91ca';\nQuery OK, 0 rows affected (Elapsed: 00:00:00.16)\nRecords: 0  Duplicates: 0  Warnings: 0\n\ngbase> show create table t1;\n+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| Table | Create Table                                                                                                                                                                                                                                                                                  |\n+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n| t1    | CREATE TABLE \"t1\" (\n  \"id\" int(11) DEFAULT NULL COMMENT '\u6dfb\u52a0\u6ce8\u91ca',\n  \"value\" int(11) DEFAULT NULL,\n  \"birth\" datetime DEFAULT NULL,\n  KEY \"idx_id\" (\"id\") KEY_BLOCK_SIZE=4096 USING HASH GLOBAL\n) ENGINE=EXPRESS DEFAULT CHARSET=utf8 TABLESPACE='sys_tablespace' COMMENT='\u6dfb\u52a0\u6570\u503c'         |\n+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n1 row in set (Elapsed: 00:00:00.00)\n<\/code><\/pre>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>\u5357\u5927\u901a\u7528GBase 8a\u6570\u636e\u5e93\u96c6\u7fa4\u652f\u6301\u8868\u7684\u6ce8\u91cacomment \uff0c\u5b57\u6bb5\u7684\u6ce8\u91ca\uff0c\u672c\u6587\u4ecb\u7ecd\u8868\u521b\u5efa\u65f6\u7684\u6ce8\u91ca\u4ee5\u53ca\u8868\u6ce8\u91ca\u548c\u5b57\u6bb5\u6ce8\u91ca\u7684\u88c5\u4fee\u3002<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1739","post","type-post","status-publish","format-standard","hentry","category-gbase8a"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=1739"}],"version-history":[{"count":3,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1739\/revisions"}],"predecessor-version":[{"id":1743,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1739\/revisions\/1743"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=1739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=1739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=1739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}