问题描述
如果我想在表中保存以前保存在SQL Server Management Studio中的任何更改(表中没有数据),则会收到错误消息:
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:
是什么可以阻止对该表进行轻松编辑?还是SQL Server Management Studio要求重新创建表进行编辑的通常方法?是什么-这个防止保存更改的选项 ?
What can prevent the table to be easily edited? Or, is it the usual way for SQL Server Management Studio to require re-creating table for editing? What is it - this "option Prevent saving changes"?
推荐答案
进入工具->选项->设计器->取消选中防止保存需要重新创建表的更改。
Go into Tools -> Options -> Designers-> Uncheck "Prevent saving changes that require table re-creation". Voila.
之所以会发生这种情况,是因为有时必须删除并重新创建表才能更改某些内容。这可能需要一段时间,因为必须将所有数据复制到临时表中,然后将其重新插入到新表中。由于默认情况下SQL Server不信任您,因此您需要说好的,我知道我在做什么,现在让我来完成我的工作。
That happens because sometimes it is necessary to drop and recreate a table in order to change something. This can take a while, since all data must be copied to a temp table and then re-inserted in the new table. Since SQL Server by default doesn't trust you, you need to say "OK, I know what I'm doing, now let me do my work."
这篇关于在SQL Server Management Studio中编辑表后保存更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!