This is an automated email from the ASF dual-hosted git repository. jiafengzheng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 337a2fe2b9 [Doc] Add alter table comment doc (#11294) 337a2fe2b9 is described below commit 337a2fe2b9fc78822d879829a04ba4072047a743 Author: Stalary <stal...@163.com> AuthorDate: Fri Jul 29 16:47:16 2022 +0800 [Doc] Add alter table comment doc (#11294) Add alter table comment doc --- .../Alter/ALTER-TABLE-COMMENT.md | 80 ++++++++++++++++++++++ .../Alter/ALTER-TABLE-COMMENT.md | 80 ++++++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-COMMENT.md b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-COMMENT.md new file mode 100644 index 0000000000..4957ae2503 --- /dev/null +++ b/docs/en/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-COMMENT.md @@ -0,0 +1,80 @@ +--- +{ + "title": "ALTER-TABLE-COMMENT", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## ALTER-TABLE-COMMENT + +### Name + +ALTER TABLE COMMENT + +### Description + +This statement is used to modify the comment of an existing table. The operation is synchronous, and the command returns to indicate completion. + +grammar: + +```sql +ALTER TABLE [database.]table alter_clause; +``` + +1. Modify table comment + +grammar: + +```sql +MODIFY COMMENT "new table comment"; +``` + +2. Modify column comment + +grammar: + +```sql +MODIFY COLUMN col1 COMMENT "new column comment"; +``` + +### Example + +1. Change the table1's comment to table1_comment + +```sql +ALTER TABLE table1 MODIFY COMMENT "table1_comment"; +``` + +2. Change the table1's col1 comment to table1_comment + +```sql +ALTER TABLE table1 MODIFY COLUMN col1 COMMENT "table1_col1_comment"; +``` + +### Keywords + +```text +ALTER, TABLE, COMMENT, ALTER TABLE +``` + +### Best Practice + diff --git a/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-COMMENT.md b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-COMMENT.md new file mode 100644 index 0000000000..29047ee86f --- /dev/null +++ b/docs/zh-CN/docs/sql-manual/sql-reference/Data-Definition-Statements/Alter/ALTER-TABLE-COMMENT.md @@ -0,0 +1,80 @@ +--- +{ + "title": "ALTER-TABLE-COMMENT", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## ALTER-TABLE-COMMENT + +### Name + +ALTER TABLE COMMENT + +### Description + +该语句用于对已有 table 的 comment 进行修改。这个操作是同步的,命令返回表示执行完毕。 + +语法: + +```sql +ALTER TABLE [database.]table alter_clause; +``` + +1. 修改表注释 + +语法: + +```sql +MODIFY COMMENT "new table comment"; +``` + +2. 修改列注释 + + 语法: + +```sql +MODIFY COLUMN col1 COMMENT "new column comment"; +``` + +### Example + +1. 将名为 table1 的 comment 修改为 table1_comment + +```sql +ALTER TABLE table1 MODIFY COMMENT "table1_comment"; +``` + +2. 将名为 table1 的 col1 列的 comment 修改为 table1_col1_comment + +```sql +ALTER TABLE table1 MODIFY COLUMN col1 COMMENT "table1_col1_comment"; +``` + +### Keywords + +```text +ALTER, TABLE, COMMENT, ALTER TABLE +``` + +### Best Practice + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org