-1

I have created a local database db.mdf in VS2010 asp.net website. In there are a few tables.

Now I need to rename the tables. But query designer doesn't let me. How do I rename those tables?

til
  • 205
  • 2
  • 5
user1826475
  • 19
  • 1
  • 5
  • may be this will help you select table in server explorer press f2 or rename table by right click option. – Mohit Dec 06 '12 at 12:55

3 Answers3

0
  1. In Server Explorer, right-click the table you want to rename and choose Open Table Definition from the shortcut menu.

The table opens in the Table Definition window of Table Designer. 2. Right-click the table in the Table Definition window and choose Properties from the shortcut menu. 3. In the field for the Name value in the Properties window, type a new name for the table.

  1. To cancel this action, press the ESC key before leaving this field.

  2. From the File menu choose Save table name.

Sagar Modi
  • 770
  • 2
  • 7
  • 29
0

Rename database tables in Visual Studio:

  1. Server Explorer
  2. Right click on the tables
  3. Click the Edit Table Schema
Eric Leschinski
  • 146,994
  • 96
  • 417
  • 335
nate wew
  • 181
  • 1
  • 9
0

The answers did not work for me in Visual Studio 2017. The Table field is locked for some reason.

What worked for me is the following. In the T-SQL tab change the entry

CREATE TABLE [dbo].[Table] (

to

CREATE TABLE [dbo].[NewTableName] (

Then select Update (top-left). It worked for me.

roschach
  • 8,390
  • 14
  • 74
  • 124
Caleb Taylor
  • 31
  • 1
  • 4