How to Rename a Column in SQL Server in SQL Server

Renaming a column in SQL Server is performed by using SP_RENAME stored procedure:

-- syntax
sp_rename 'table_name.old_column_name', 'new_column_name', 'column';

-- rename product_category column in products table
exec sp_rename  'products.product_category', 'category', 'column';

Previous

Next

Ready for a modern SQL editor?