Saturday, 15 April 2017

how to rename column name in sql server

Hi friends in this article i will show you how to change/rename column name after creating table in SQL Server.
Actually it is very easy.....lets start


Rename Column Name:- 

Syntax:-  

sp_rename 'TableName.ColumnName','Column';

For suppose I had a table with name kishor in that I had 3 columns. I want to change "kname" as just "name" .


Example:-

sp_rename 'kishor.kname', 'name', 'column';

or

exec sp_rename 'kishor.kname', 'name', 'column';







In the above screenshot you can see the column name changed as "kname" to "name"

I hope you understand.
Thanks for reading. 
I will come with new concept bye.

Ravi Kumar.
Hyderabad India. 




22 comments:

  1. http://www.msdotnet.co.in/2014/07/how-to-implement-3-tier-architecture.html#.WPy_o9J97Dd

    ReplyDelete
  2. http://www.c-sharpcorner.com/UploadFile/2f59d0/use-ajaxcontroltoolkit-calendar-extender-with-Asp-Net/

    ReplyDelete
  3. http://csharpdotnetfreak.blogspot.com/2012/06/login-page-form-example-in-aspnet.html

    ReplyDelete
  4. http://learn.bigclasses.com/dot-net-interview-questions-and-answers-for-experienced

    ReplyDelete
  5. http://www.c-sharpcorner.com/UploadFile/c25b6d/working-on-arraylist-using-C-Sharp/

    ReplyDelete
  6. http://www.c-sharpcorner.com/article/when-to-use-abstract-class-and-interface-in-real-time-projects/

    ReplyDelete
  7. https://www.codeproject.com/Articles/468198/Store-Images-in-SQL-Server

    ReplyDelete
  8. https://www.codeproject.com/Articles/10861/Storing-and-Retrieving-Images-from-SQL-Server-usin

    ReplyDelete
  9. http://www.c-sharpcorner.com/UploadFile/5089e0/show-image-in-gridview-using-Asp-Net/

    ReplyDelete
  10. http://www.dotnetfox.com/articles/store-images-to-database-and-bind-to-gridview-in-Asp-Net-1114.aspx

    ReplyDelete
  11. http://www.aspdotnet-suresh.com/2013/04/display-images-in-aspnet-gridview-from.html

    ReplyDelete
  12. Insert images in database and bind in gridview...

    ReplyDelete
  13. http://aspdotnetcodes.com/Insert_Images_Database.aspx

    ReplyDelete
  14. https://www.aspsnippets.com/Articles/Display-Images-in-GridView-Control-using-the-path-stored-in-SQL-Server-database.aspx

    ReplyDelete
  15. Report Viewer....
    http://www.c-sharpcorner.com/blogs/how-to-create-report-using-report-viewer-in-asp-net1

    ReplyDelete
  16. http://www.c-sharpcorner.com/UploadFile/cda5ba/object-oriented-programming-with-real-world-scenario/

    ReplyDelete
  17. https://www.aspsnippets.com/Articles/Building-Modal-Popup-using-ASPNet-AJAX-ModalPopupExtender-Control.aspx

    ReplyDelete
  18. http://www.developerhandbook.com/career/8-things-every-net-developer-must-understand/

    ReplyDelete
  19. http://www.dotnettricks.com/learn/csharp/c-sharp-extension-method

    ReplyDelete
  20. http://www.dotnettricks.com/learn/csharp/c-sharp-extension-method

    ReplyDelete
  21. https://www.tutorialspoint.com/linq/

    linq rutorials

    ReplyDelete
  22. http://www.c-sharpcorner.com/blogs/difference-between-datareader-dataset-dataadapter-and-datatable-in-c-sharp1

    ReplyDelete