Search code examples
c#asp.netsql-servervisual-studio-2013

How to change the table name in visual studio 2013 in design mode?


I created a SQL database table in Visual Studio 2013. I want to rename it but the name property is disabled. How can I change the table name?

enter image description here


Solution

  • In Server Explorer right click on Views and click New Query.
    use this code to rename table:

    EXEC sp_rename 'Table', 'NewName'  
    

    then click on Execute button.
    after 5-30 seconds in server explorer click on refresh button.

    enter image description here