SQL Server prevents saving the modified table structure solution _mssql

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

In our program development, we sometimes modify the table structure in the database because of the changing requirements. It may be the addition or decrease of the column, or modify the data type, or modify the column name, and so on. However, modifying the table structure is a risky operation, and by default, when you modify the table structure, the following prompt box pops up

The above illustration is the data type that modifies the column in the Deuser table (modified from varchar to int), and then the Prompt box that pops up when it is saved. What if we don't want to recreate the table and just want to modify its structure on the basis of the original?

The steps are as follows:

Step 1. Open SQL Server Management Studio

Step 2. Select Tools (Tool menu)

Step 3. Select options (option)

Step 4. Find Designers (designer)

Step 5. Select table and DB Designers (table and Database Designer) under designers

Step 6. Remove the check option on the right prevent saving changes that require table re-creation

Step 7. Save

The specific details are shown in the following illustration:

It is recommended that your novice database friend cancel this option when you use it by looking for "tools" on the menu bar in Management Studio and clicking on the following options to expand designers in the interface below, select Table Designer and Database Designer, and Prevent saving changes that require a table to be recreated "the check in front is aborted.

That's how SQL Server prevents you from saving changes that require you to recreate the table. I hope to help you, thank you for your reading.

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.