2

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)
1

1 Answer 1

6

Try without the parentheses:

ALTER TABLE my_table 
ADD PublishedDate DATETIME, UnpublishedDate DATETIME

Here is a sqlfiddle with a demo for you to try.

Sign up to request clarification or add additional context in comments.

1 Comment

Wow, thank you! I knew it was going to be something right in front of my face

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.