Follow us

Thursday, January 27, 2011

SQL Query to change Column Name of a Table


EXEC sp_Rename 'TABLENAME.OLD_COLUMNNAME',NEW_COLUMNNAME,'COLUMN'

NOTE: While execution of the query, you will get the following message:

Caution: Changing any part of an object name could break scripts and stored procedures.


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

2 comments: on "SQL Query to change Column Name of a Table"

Aashish Khandelwal said...

Its working fine in MSSQL 2005 and MSSQL 2008

Rajesh said...

Great Aashish if u need more update just open http://itneeds4u.blogspot.com/

Post a Comment