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

asked 19 Dec '21, 20:28

jorgeftz's gravatar image

jorgeftz
24125
accept rate: 0%


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.

permanent link

answered 20 Dec '21, 01:20

Volker%20Barth's gravatar image

Volker Barth
38.6k351525796
accept rate: 34%

edited 20 Dec '21, 03:09

1

Dear Volker,

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

Jorge Santos

(20 Dec '21, 04:52) jorgeftz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×123

question asked: 19 Dec '21, 20:28

question was seen: 1,090 times

last updated: 20 Dec '21, 04:52