Reputation: 347
I'm stumped, and I know this is probably something very simple. I am trying to add two columns to an existing table.
I am receiving the following syntax error:
Incorrect syntax near 'PublishedDate' Expecting '(', or SELECT.
Here is my SQL:
ALTER TABLE my_table ADD (PublishedDate DATETIME, UnpublishedDate DATETIME)
Upvotes: 2
Views: 4098
Reputation: 70678
Try without the parentheses:
ALTER TABLE my_table
ADD PublishedDate DATETIME, UnpublishedDate DATETIME
Here is a sqlfiddle with a demo for you to try.
Upvotes: 6