Saving changes after table edit in SQL Server Management Studio

后端 未结 7 1745
有刺的猬
有刺的猬 2020-11-28 00:59

If I want to save any changes in a table, previously saved in SQL Server Management Studio (no data in table present) I get an error message:

Saving c

7条回答
  •  死守一世寂寞
    2020-11-28 02:02

    Many changes you can make very easily and visually in the table editor in SQL Server Management Studio actually require SSMS to drop the table in the background and re-create it from scratch. Even simple things like reordering the columns cannot be expressed in standard SQL DDL statement - all SSMS can do is drop and recreate the table.

    This operation can be a) very time consuming on a large table, or b) might even fail for various reasons (like FK constraints and stuff). Therefore, SSMS in SQL Server 2008 introduced that new option the other answers have already identified.

    It might seem counter-intuitive at first to prevent such changes - and it's certainly a nuisance on a dev server. But on a production server, this option and its default value of preventing such changes becomes a potential life-saver!

提交回复
热议问题