23 November 2013

Local Temp Table vs Global Temp Table

Local Temp Table vs Global Temp Table
S.NoParticularsLocal Temp TableGlobal Temp Table
1Available SQL Server session or connection (means single user) all SQL Server sessions or connections (means all the user).
2deleted These are automatically deleted when the session that created the tables has been closedThese can be created by any SQL Server connection user and these are automatically deleted when all the SQL Server connections have been closed.
3stared with signLocal temporary table name is stared with single hash ("#") sign.Global temporary table name is stared with double hash ("##") sign.

No comments: