Try using sp_rename procedure, e.g.
EXEC sp_RENAME 'dbo.test.oldColumn', 'newColumn', 'COLUMN'
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I thought the simple way to rename a column in SQL server was
ALTER TABLE TableName
RENAME COLUMN OldColumnName TO NewColumnName;
This results in
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near 'RENAME'.
Did something change or am I doing something wrong? I ended up just going into Design... on the table and simply typed over the name, but I thought this was not the "programmer's" way, lol.
Try using sp_rename procedure, e.g.
EXEC sp_RENAME 'dbo.test.oldColumn', 'newColumn', 'COLUMN'