-1

How to change the column name in SQL Server 2014 using query?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mohsin Mahmood
  • 3,238
  • 3
  • 21
  • 25

1 Answers1

8

For this you can use this query

USE DATABASE;  
GO  
EXEC sp_rename 'TABLE.COLUMN_NAME', 'COLUMN_NEW_NAME', 'COLUMN';  
GO

You will have to replace DATABASE,TABLE,COLUMN_NAME and COLUMN_NEW_NAME with your data

ChrisM
  • 1,576
  • 6
  • 18
  • 29
Mircea Pop
  • 111
  • 6