2020-04-03 13:54:11 +00:00
|
|
|
DROP TABLE IF EXISTS check_comments;
|
2018-11-22 13:51:43 +00:00
|
|
|
|
2020-04-03 13:54:11 +00:00
|
|
|
CREATE TABLE check_comments
|
2018-11-22 13:51:43 +00:00
|
|
|
(
|
2019-02-27 17:01:59 +00:00
|
|
|
column_name1 UInt8 DEFAULT 1 COMMENT 'comment',
|
|
|
|
column_name2 UInt8 COMMENT 'non default comment'
|
2018-11-22 13:51:43 +00:00
|
|
|
) ENGINE = ReplicatedMergeTree('clickhouse/tables/test_comments', 'r1')
|
|
|
|
ORDER BY column_name1;
|
|
|
|
|
2020-04-03 13:54:11 +00:00
|
|
|
SHOW CREATE check_comments;
|
|
|
|
DESC check_comments;
|
2018-11-22 13:51:43 +00:00
|
|
|
|
2020-04-03 13:54:11 +00:00
|
|
|
ALTER TABLE check_comments COMMENT COLUMN column_name1 'another comment';
|
2018-11-22 13:51:43 +00:00
|
|
|
|
2020-04-03 13:54:11 +00:00
|
|
|
SHOW CREATE check_comments;
|
|
|
|
DESC check_comments;
|
2018-11-22 13:51:43 +00:00
|
|
|
|
2020-04-03 13:54:11 +00:00
|
|
|
SELECT * FROM system.columns WHERE table = 'check.comments' and database = currentDatabase();
|
2018-11-22 13:51:43 +00:00
|
|
|
|
2020-04-03 13:54:11 +00:00
|
|
|
DROP TABLE check_comments;
|