What are the differences between the following 3 in sql-server 2008?
#Table_name
##Table_name
@Table_name
What are the differences between the following 3 in sql-server 2008?
#Table_name
##Table_name
@Table_name
From MSDN: Database Identifiers (reformatted to better suit the question).
Certain symbols at the beginning of an identifier have special meaning in SQL Server.
See this Question
https://stackoverflow.com/a/64891/886591
#table = temp table tied to the spid
##table = global temp table
@table = table variable
#table_name - Local Temp Table
##table_name - global temporary table
@Table_name - table-variable - It also exists only for the duration of a user session
Temp Table and Table Variable
— both are created in TempDB and not in memory