In this article I will explain how to change or rename column name or table name in SQL server.
In previous posts I explained many articles relating to SQL Server. Now I will explain how to rename or change column name or table name in SQL Server.
SP_RENAME 'TableName.[OldColumnName]'
, '[NewColumnName]', 'COLUMN'
|
SP_RENAME 'UserInformation.[UserDetail]'
, '[UserName]', 'COLUMN'
|
SP_RENAME '[OldTableName]'
, '[NewTableName]'
|
SP_RENAME '[UserDetails]'
, '[UserInformation]'
|
By using above statements we can rename existing table in database or we can rename existing Column in table.
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
Subscribe by RSS
Subscribe by Email
1 comments :
not much explaination