Solved

Temp Tables # or ## - what is the difference??

Posted on 2007-03-31
1
142 Views
Last Modified: 2010-03-19
What is the difference between temporary tables prefixed with # and ## in sqlserver 2005
0
Comment
Question by:Fraser_Admin
1 Comment
 
LVL 24

Accepted Solution

by:
DBAduck - Ben Miller earned 500 total points
ID: 18830748
# is for connection specific or SCOPE temp tables and ## is a global temp table which means that other scopes have access to the table.

Most of the time you would be dealing with # temp tables because it would be a very interesting thing to have a ## table and have many different connections using it.  But for specific reasons in a specific use, the ## is available in triggers, etc. and for a controlled use, it could be helpful.

Hope that helps.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question