简体   繁体   中英

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.

If I select Open Table for a temporary global 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.

There is no fix for this issue, other than:

(a) using a permanent table instead of a global ##temp table. What does the global ##temp table buy you over a permanent table? They both kill concurrency just as effectively.

(b) using Script Table As > SELECT TO > New Query Editor Window. 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).

(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. The latter does (b).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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