Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add column error when using AFTER clause

Status
Not open for further replies.

cdfly

Programmer
Jun 16, 2010
68
US
Hello,
I need to add a column to an existing table using a script. I get an error when I use the AFTER clause.
Here's the statement:
ALTER TABLE testTable
Add newColumn varchar(200) NULL AFTER someColumnName

We are using SQL Server 2000.
There error I'm getting is:
Incorrect syntax near 'AFTER'

 
Interesting. I found some examples on the web, maybe it was Oracle but the examples were in the SQL Server examples
 
That is a MySQL command, not a SQL Server command.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top