0

I am having a frustrating problem when I try to add a new column in an existing table named Groupon the SQL Server.

My command is the following:

ALTER TABLE Group
ADD languageID INT 

The error I get is the following:

Incorrect syntax near 'Group'. Expecting '.', ID, or QUOTED_ID

Any idea why is this happening ?

5 Answers 5

3

Group is reserved word. put it into brackets, like next

ALTER TABLE [Group]
ADD languageID INT 
Sign up to request clarification or add additional context in comments.

2 Comments

@dimmik, welcome bro, plz flag this answer as accepted one.
i will i just need to wait a few minutes
2

Since GROUP is a key word, you should not use it for Object names. If possible rename your table name to another name.

However try like below

ALTER TABLE [Group] ADD languageID INT 

Comments

1

Group is a keyword in SQL Server. Please try this:

ALTER TABLE [Group]
ADD languageID INT 

Comments

1

Group is a sql reserved keyword. So it is giving syntax error as it is referring to that keyword. use this

ALTER TABLE [Group]
ADD languageID INT 

Or you can create different table with different name like Group1

Comments

1
ALTER TABLE [Group]
ADD languageID INT 

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.