Get the App
SLTechnology News&Howtos  ›  Database  › 

Sequential Operation method and problems of columns in Adjustment Table of SQL Server Database

Shulou Source: shulou.com Published: 2022-06-01 04:19:51 10月02日 Update

Once the tables in the SQL Server database are created, we do not recommend adjusting the order of the columns without authorization, especially when the corresponding application system is online, because some developers do not necessarily specify the column names in the code. Whether the table can adjust the order of the columns can actually be set on its own, and we recommend that it be set to forbidden after installation.

So, if we do need to adjust the order of a column, how do we do it? Next, we will demonstrate how to remove this restriction. Of course, through the demonstration of removing restrictions, I believe you all know how to add restrictions.

Requirements and problem description

1) Test table Test001

(2) before updating

(3) for example, the requirement is to adjust the sequence of SN5 and SN4

Click Save Times error

Prompt when modifying database table structure [changes are not allowed to be saved. The changes you made require that the following table be deleted and recreated. You have made changes to tags that cannot be recreated or enabled the prevent saving changes that require table recreation. ]

Treatment method

Step 1 is in the SSMS client, click the menu [tools] and select [options]

Step 2 opens the options dialog box, and we expand the designer [Designers]

Step 3 cancel the [prevent saving changes that require table recreation] check box

Step 4 adjusts the column order again to modify the OK

Summary

The above is the sequence operation method and problems encountered in the SQL Server database adjustment table introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message for me. The editor will reply to you in time!

Tags: Adjustments orders data databases restrictions methods questions suggestions requirements demonstrations adjustment tables middle fingers middle tables people code again customers clients dialogs tools Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL MariaDB Docker Shulou Information Xiaomi