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

38,774

Solution 1

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

Solution 2

You can change table name in SQL Server Object Explorer in Visual Studio. Choose the table in tree and rename by right-click on the table -> rename

Solution 3

The correct answer as follows: 1.First select your table that you want to change. 2. Then change the name in the script pane. 3.Finally in the upper-left corner of the Table Designer, choose the Update button. Please as shown below:

enter image description here

Solution 4

Ive been trying to too, and the simple option to rename the [dbo][Table] did not seem to work.

But it actually does! Please note that refreshing doesn't work right away.

Steps:

  1. rename [dbo][Table] to [dbo][yourTable]
  2. press update button
  3. Refresh a few times, it may take a minute.

Hope this helps :) It seems a like really wierd bug.

Share:
38,774
Samiey Mehdi
Author by

Samiey Mehdi

I am a web developer with C# and ASP.NET.

Updated on July 22, 2022

Comments

  • Samiey Mehdi
    Samiey Mehdi almost 2 years

    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