如何解决“表 'dbo.Foo' 已经存在."表不存在时出错? [英] How can I resolve the "Table 'dbo.Foo' already exists." error when the table does not exist?

查看:45
本文介绍了如何解决“表 'dbo.Foo' 已经存在."表不存在时出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个表,然后意识到我犯了一个错误.SSMS 不允许我在不重新创建表的情况下更新它,因此我删除了该表,然后尝试重新创建它.

它不会让我这样做,我会收到一个错误对话框

<块引用>

表 'dbo.Foo' 已经存在.

所以我尝试再次删除它:

删除表 dbo.Foo

<块引用>

无法删除表 'dbo.Foo',因为它不存在或您没有权限.

刷新 IntelliSense 缓存无济于事.

解决方案

关闭并重新启动 SSMS 似乎是摆脱错误的唯一方法.这样做后,我可以再次成功创建表.

I've created a table and then realised I made a mistake. SSMS wouldn't let me update the table without recreating it, so I've deleted the table and then tried to create it again.

It won't let me do this, and I get an error dialog

Table 'dbo.Foo' already exists.

So I try to delete it again:

drop table dbo.Foo

Cannot drop the table 'dbo.Foo', because it does not exist or you do not have permission.

Refreshing the IntelliSense cache does not help.

解决方案

Closing and restarting SSMS seems to be the only way to get rid of the error. After doing so, I can again successfully create the table.

这篇关于如何解决“表 'dbo.Foo' 已经存在."表不存在时出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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