简体   繁体   English

如果我为临时全局表选择“打开表”,为什么在SQL Server 2005中不起作用?

[英]Why if I select `Open Table` for temporary global table doesn't work in SQL Server 2005?

I have an issue in Management Studio Express 2005. 我在Management Studio Express 2005中有问题。

If I select Open Table for a temporary global table: 如果我为临时全局表选择“ Open Table ”:

在此处输入图片说明

Not works, the error appears: 不起作用,出现错误:

在此处输入图片说明

But if I write 但是如果我写

SELECT * FROM dbo.##tempResults

then the table content will appears. 然后将显示表格内容。

在此处输入图片说明

There are any fix for this problem ? 有解决此问题的方法吗?

I have SP4 for Management Studio. 我有用于Management Studio的SP4。

There is no fix for this issue, other than: 除以下以外,没有解决此问题的方法:

(a) using a permanent table instead of a global ##temp table. (a)使用永久表而不是全局## temp表。 What does the global ##temp table buy you over a permanent table? 全局## temp表在永久性表上能为您带来什么? They both kill concurrency just as effectively. 它们都同样有效地杀死了并发。

(b) using Script Table As > SELECT TO > New Query Editor Window. (b)使用脚本表为>选择到>新建查询编辑器窗口。 It's a little less direct but you still don't have to type and you avoid the terrible habit of using Open Table in the first place (this places all kinds of unnecessary locks on the underlying table because you could choose to edit the data in a grid, pretending you're using Excel). 它的直接性稍差一些,但您仍然不必键入,并且避免了使用Open Table的可怕习惯(这会在基础表上放置各种不必要的锁,因为您可以选择在一个表中编辑数据。网格,假装您正在使用Excel)。

(c) moving past SQL Server 2005. In SQL Server 2008+ the menu option Open Table is gone, now there are two separate options, edit top n rows and select top n rows. (c)越过SQL Server2005。在SQL Server 2008+中,菜单选项“打开表”消失了,现在有两个单独的选项,编辑前n行并选择前n行。 The latter does (b). 后者确实(b)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM