Sql Server'不容許保存更改'錯誤►防止保存須要從新建立表的更改

問題:

When I create a table in SQL Server and save it, if I try to edit the table design, like change a column type from int to real, I get this error: 當我在SQL Server中建立一個表並保存它時,若是我嘗試編輯表設計,好比將列類型從int更改成real,我會收到如下錯誤: ui

Saving changes is not permitted. 不容許保存更改。 The change you have made requires the following table to be dropped and re-created. 您所作的更改須要刪除並從新建立下表。 You have either made changes to a table that can't be recreated or enabled the option prevent saving changes that require the table to be re-created. 您已對沒法從新建立或啓用的表進行了更改,該選項會阻止保存須要從新建立表的更改。 this

Why do I have to re-create the table? 爲何我要從新建立表? I just want to change a data type from smallint to real . 我只想將數據類型從smallint更改成real spa

The table is empty, and I didn't use it until now. 該表是空的,直到如今我才使用它。 .net


解決方案:

參考一: https://stackoom.com/question/SZhZ/Sql-Server-不容許保存更改-錯誤-防止保存須要從新建立表的更改
參考二: https://oldbug.net/q/SZhZ/Sql-Server-Saving-changes-is-not-permitted-error-Prevent-saving-changes-that-require-table-re-creation