cancel
Showing results for 
Search instead for 
Did you mean: 

Sql Anywhere 16, unable to add comment an existing table

1,914

Hello, Im trying to add the add as follows:

ALTER TABLE dbo.api_sugar_uggroups ADD Comment TEXT NULL

but return the erros: syntax error near 'Comment' on line 1 SQLCODE=-131, ODBC 3 state="4200" line 1, column 1

So, Im not sure how to fix it.

Jorge Santos

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

You are using ALTER TABLE to add a column to the according table. If that is what you want, note that COMMENT is a reserved word and needs to be put in double quotes when used as a column name or other identifier, so you should try:

ALTER TABLE dbo.api_sugar_uggroups ADD "Comment" TEXT NULL

However, if you just want to add a comment on the table, use the separate COMMENT statement instead.

Dear Volker,

I double quoted and now it's ok. Thank you very much for your help.

Jorge Santos

Answers (0)