This commit is contained in:
feng lv 2021-10-31 12:18:22 +00:00
parent 6f12348282
commit 6d7b073036
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,4 @@
CREATE TABLE `02111_modify_table_comment`.t\n(\n `n` Int8\n)\nENGINE = MergeTree\nORDER BY n\nSETTINGS index_granularity = 8192\nCOMMENT \'this is a MergeTree table\'
CREATE TABLE `02111_modify_table_comment`.t\n(\n `n` Int8\n)\nENGINE = MergeTree\nORDER BY n\nSETTINGS index_granularity = 8192\nCOMMENT \'MergeTree Table\'
CREATE TABLE `02111_modify_table_comment`.t_merge\n(\n `n` Int8\n)\nENGINE = Merge(\'02111_modify_table_comment\', \'t\')\nCOMMENT \'this is a Merge table\'
CREATE TABLE `02111_modify_table_comment`.t_merge\n(\n `n` Int8\n)\nENGINE = Merge(\'02111_modify_table_comment\', \'t\')\nCOMMENT \'Merge Table\'

View File

@ -0,0 +1,32 @@
DROP DATABASE IF EXISTS 02111_modify_table_comment;
CREATE DATABASE 02111_modify_table_comment;
USE 02111_modify_table_comment;
CREATE TABLE t
(
`n` Int8
)
ENGINE = MergeTree
ORDER BY n
COMMENT 'this is a MergeTree table';
SHOW CREATE t;
ALTER TABLE t
MODIFY COMMENT 'MergeTree Table';
SHOW CREATE t;
CREATE TABLE t_merge AS t
ENGINE = Merge('02111_modify_table_comment', 't')
COMMENT 'this is a Merge table';
SHOW CREATE t_merge;
ALTER TABLE t_merge
MODIFY COMMENT 'Merge Table';
SHOW CREATE t_merge;
DROP DATABASE 02111_modify_table_comment;