v.23.9New Feature

Add Support for ALTER TABLE MODIFY COMMENT in ClickHouse

Add support for ALTER TABLE MODIFY COMMENT. Note: something similar was added by an external contributor a long time ago, but the feature did not work at all and only confused users. This closes #36377. #51304 (Alexey Milovidov). Note: this command does not propagate between replicas, so the replicas of a table could have different comments.
Added support for ALTER TABLE MODIFY COMMENT to allow changing the comment of a table after its creation.

Why it matters

This feature addresses the previous lack of a reliable way to modify table comments, which were either unsupported or confusing for users. It enables better metadata management by allowing users to update table descriptions without recreating tables. However, note that comments do not propagate between replicas and may differ in replicated setups.

How to use it

Use the ALTER TABLE MODIFY COMMENT statement to change the comment of an existing table. For example:

ALTER TABLE <table_name> MODIFY COMMENT 'New table comment';

Be aware that in replicated tables, comments are not synchronized between replicas.