在SQL Server Management Studio中编辑表后保存更改 [英] Saving changes after table edit in SQL Server Management Studio

查看:476
本文介绍了在SQL Server Management Studio中编辑表后保存更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想在表中保存以前保存在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:


不允许保存更改。您所做的更改要求删除并重新创建以下表格中的
。您已经对无法重新创建的表进行了
更改,或者启用了
选项防止保存需要重新创建该表的更改。

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.

是什么可以阻止对该表进行轻松编辑?还是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中编辑表后保存更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆