使用 SQL Server 2008 Management Studio 修改資料表結構 (如新增/刪除欄位、變更資料類型) 時,按下儲存卻跳出錯誤:
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.
SSMS 預設啟用 「防止儲存需要重建資料表的變更」 選項。當變更涉及資料表重建 (如調整欄位順序、變更資料類型、新增 NOT NULL 無預設值欄位等) 時,SSMS 為保護資料安全而封鎖儲存。
ALTER TABLE 腳本部署變更,納入版控與代碼審查流程