How to change the column name in SQL Server 2014 using query?
Asked
Active
Viewed 2.5k times
-1
-
Please always google before asking question. – FLICKER Sep 29 '17 at 23:41
1 Answers
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
-
@ChrisM yes his query is for Oracle SQL, I didn't comment on his answer cause i don't have enough rep :) PS: ty for the answer format edit – Mircea Pop Sep 30 '17 at 00:43
-