Category Archives: SQL Temporary Tables

SQL Temporary Tables

SQL Server-Table Variable

Table variable:- SQL Server provides an variable known as table variable which is used to store data in a similar way as we store data in physical tables but with some limitations. Like other SQL variable, it is also declare with the help … Continue reading

Posted in SQL Basic Concepts, SQL Server, SQL Temporary Tables | Tagged , | 4 Comments

SQL Server – Local temporary table

Local temporary table:- Local temporary table is created in the tempdb and it is visible to the current user’s session only. It remains exists till the current user session is connected. Once the user connection is disconnected it gets destroyed. … Continue reading

Posted in SQL Server, SQL Temporary Tables | Tagged , | Leave a comment

SQL Server – Global temporary tables

Global temporary table:- Global temporary table is created in the tempdb  and it is visible to all other sessions as well. Global temporary tables are only destroyed when the current user disconnected and all the sessions referring to it closed. It means no … Continue reading

Posted in SQL Server, SQL Temporary Tables | Tagged , | 31 Comments