Change column name in a MSSQL table

For some reason, MS does not have a built in command for this?


Not sure why this is as competeing technologies like Oracle and MySQL do, but there is a stored procedure that will get you where you are going:
EXEC sp_rename 'TABLENAME.OLD_COLUMNNAME', 'NEW_COLUMNAME', 'COLUMN';

Just replace TABLENAME.OLD_COLUMNNAME and NEW_COLUMNNAME with your new values.
Comments are closed