-1

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

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
Mohsin Mahmood
  • 2,506
  • 3
  • 16
  • 23

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,518
  • 6
  • 17
  • 27
Mircea Pop
  • 111
  • 6