Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a table as below
1	2	3
------------------
a	b	c
d	d	f


The actual column name for this table is in another table

ID	Value
-------------
1	COLA	
2	COLB
3	COLC


I want result like
COLA	COLB	COLC
----------------------
a	b	c
d	d	f
Posted
Updated 19-Apr-14 5:32am
v2
Comments
syed shanu 20-Apr-14 21:54pm    
The script for renaming any column :
sp_RENAME 'TableName.[OldColumnName]' , '[NewColumnName]', 'COLUMN'

chk this link for more details :
http://blog.sqlauthority.com/2008/08/26/sql-server-how-to-rename-a-column-name-or-table-name/

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900