How to modify the table name in Server Explorer of Visual Studio

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

Vs seems to have forgotten to add this function, but when the table name is wrong, it cannot always run into SQL Server Management studio. In fact, it can be solved directly by using SQL statements.

 

1. Right-click the name of the table to be changed in Server Explorer (in fact, any table can be used)

2. Select New query. In the "Add Table" dialog box that appears, do not select any table. Directly close the table.

3. Write in the box that says select from:

Exec sp_rename oldname, newname

Here, oldname/newname is the old and new table names. Note that there is an unreasonable "," in the middle. Maybe there are too few SQL statements.

4. Execute (CTRL + r) and an error will be reported. Ignore this option and select "continue"

5. Successful

 

Click to download the free agile development textbook: Martian agile development manual

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.