Skip to content Skip to sidebar Skip to footer

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?

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.

Solution 5:

You can change table name in T-SQL part as showin in image as follows..

CREATE TABLE{dbo].[t1]{
{
   ...
   ...
}

to

CREATE TABLE{dbo].[t2]{
{
   ...
   ...
}

ans then press "Update" button present above...

Post a Comment for "How To Change The Table Name In Visual Studio 2013 In Design Mode?"