Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a comment in alter command in oracle [duplicate]

Tags:

oracle

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

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.

like image 371
Stranger Avatar asked Dec 16 '22 08:12

Stranger


1 Answers

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

comment on column schema.table.column is 'some comment';
like image 164
David Aldridge Avatar answered Jan 14 '23 23:01

David Aldridge