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