oracle 在oracle的alter命令中添加注释

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17865523/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 05:11:01  来源:igfitidea点击:

Adding a comment in alter command in oracle

oracle

提问by Stranger

I am adding a column in oracle and I also want to add comments to describe the column. Here's my syntax:

我在 oracle 中添加了一个列,我还想添加注释来描述该列。这是我的语法:

ALTER TABLE TableName ADD (ColumnName  VARCHAR(10) null COMMENT ON tableName.columnName IS 'some comments');

Her's the error:

她的错误是:

SQL Error: ORA-00907: missing right parenthesis
00907. 00000 -  "missing right parenthesis"
*Cause:    
*Action:

I will appreciate any help.

我将不胜感激任何帮助。

回答by David Aldridge

The syntax is well documented: http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_4009.htm

语法有据可查:http: //docs.oracle.com/cd/B28359_01/server.111/b28286/statements_4009.htm

comment on column schema.table.column is 'some comment';