SQL Server 2005, 2008, 2012

Wednesday, 13 July 2016

Rename Column Name in SQL Server 2005, 2008, 2012

In SQL Server 2005, 2008, 2012 to rename a column in a table we can call an SP  sp_RENAME as below :

    

EXEC sp_RENAME 'TableName.OldColumnName' , 'NewColumnName', 'COLUMN'

    
 


Alternately, open the table in Object Explorer and then right click on the desired column and select RENAME. Give a new column name here.



Reference: Govind Badkur(http://sqlserver20.blogspot.com)
Posted by Govind at 23:12 0 comments
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: T-SQL
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • The current transaction cannot be committed and cannot support operations that write to the log file.
  • Convert Number in Indian Currency Format
  • Convert Number into Words in SQL Server
  • Merge Cells Vertically in SSRS
  • Remote table-valued function calls are not allowed

Categories

  • T-SQL (31)

Blog Archive

  • ►  2020 (1)
    • ►  July (1)
  • ►  2018 (2)
    • ►  May (1)
    • ►  April (1)
  • ►  2017 (10)
    • ►  April (4)
    • ►  January (6)
  • ▼  2016 (8)
    • ►  August (1)
    • ▼  July (1)
      • Rename Column Name in SQL Server 2005, 2008, 2012
    • ►  June (2)
    • ►  May (4)
  • ►  2015 (1)
    • ►  January (1)
  • ►  2013 (2)
    • ►  October (1)
    • ►  May (1)
  • ►  2012 (35)
    • ►  October (1)
    • ►  September (6)
    • ►  August (4)
    • ►  July (2)
    • ►  June (10)
    • ►  May (8)
    • ►  April (4)

About Me

My photo
Govind
View my complete profile
Powered by Blogger.