SQL Server rename column

Larry Brister
Larry Brister used Ask the Experts™
on
I need to rename a column name in a sql stored procedure during a process.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Database Consultant
Top Expert 2009
Commented:
This example renames the contact title column in the customers table to title.

EXEC sp_rename 'customers.[contact title]', 'title', 'COLUMN'

AneeshDatabase Consultant
Top Expert 2009

Commented:
remember, the column name  should be specified as
TableName.ColumnName

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial