From 253056ca535875ca549cc3f2db4b706561d8d8cd Mon Sep 17 00:00:00 2001 From: EmmyMiao87 <522274284@qq.com> Date: Mon, 22 Mar 2021 10:50:55 +0800 Subject: [PATCH] [Docs] Modify schema change sql reference (#5530) Modify the error examples --- .../sql-statements/Data Definition/ALTER TABLE.md | 5 +++-- .../sql-statements/Data Definition/ALTER TABLE.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/en/sql-reference/sql-statements/Data Definition/ALTER TABLE.md b/docs/en/sql-reference/sql-statements/Data Definition/ALTER TABLE.md index 07a5a29eaf..0ddd8729c7 100644 --- a/docs/en/sql-reference/sql-statements/Data Definition/ALTER TABLE.md +++ b/docs/en/sql-reference/sql-statements/Data Definition/ALTER TABLE.md @@ -318,9 +318,10 @@ under the License. DROP COLUMN col2 FROM example_rollup_index; - 7. Modify the base index's col1 column to be of type BIGINT and move to the col2 column + 7. Modify the base index's col1 key column to be of type BIGINT and move to the col2 column + (*Attention: Whether to modify the key column or the value column, complete column information need to be declared. For example, MODIFY COLUMN xxx COLUMNTYPE [KEY|agg_type]*) ALTER TABLE example_db.my_table - MODIFY COLUMN col1 BIGINT DEFAULT "1" AFTER col2; + MODIFY COLUMN col1 BIGINT KEY DEFAULT "1" AFTER col2; 8. Modify the maximum length of the val1 column of the base index. The original val1 is (val1 VARCHAR(32) REPLACE DEFAULT "abc") ALTER TABLE example_db.my_table diff --git a/docs/zh-CN/sql-reference/sql-statements/Data Definition/ALTER TABLE.md b/docs/zh-CN/sql-reference/sql-statements/Data Definition/ALTER TABLE.md index e98672346c..9e5d2754c9 100644 --- a/docs/zh-CN/sql-reference/sql-statements/Data Definition/ALTER TABLE.md +++ b/docs/zh-CN/sql-reference/sql-statements/Data Definition/ALTER TABLE.md @@ -316,9 +316,10 @@ under the License. DROP COLUMN col2 FROM example_rollup_index; - 7. 修改 base index 的 col1 列的类型为 BIGINT,并移动到 col2 列后面 + 7. 修改 base index 的 key 列 col1 的类型为 BIGINT,并移动到 col2 列后面 + (*注意,无论是修改 key 列还是 value 列都需要声明完整的 column 信息*) 例如:MODIFY COLUMN xxx COLUMNTYPE [KEY|agg_type] ALTER TABLE example_db.my_table - MODIFY COLUMN col1 BIGINT DEFAULT "1" AFTER col2; + MODIFY COLUMN col1 BIGINT KEY DEFAULT "1" AFTER col2; 8. 修改 base index 的 val1 列最大长度。原 val1 为 (val1 VARCHAR(32) REPLACE DEFAULT "abc") ALTER TABLE example_db.my_table