How to rename a column in SQL Server ?

One of the options for the user to rename a column in SQL Server is using the so_rename stored procedure and specifying the parameters.

Here’s the syntax of the sp_rename.

EXEC sp_rename '<TableName.<columnName>>' , 'newColumnName', 'COLUMN'

For example , if you want to rename the column description in the temp_abundantcode table to comment , this is how it looks.

Use AdventureWorks
GO
EXEC sp_rename 'temp_abundantcode.[description]' , 'comment', 'COLUMN'