This website includes Education Information like a programming language, job interview question, general knowledge.mathematics

Education log

PageNavi Results No.

Ads

Wednesday, October 30, 2024

what is temp table and types of temp table

 what is temp table and types of temp table


A temporary table is a variable that holds a table that exists only for a specific database session and is not permanently stored in the database. Temporary tables are used to store and manipulate data during a session, and can be used in a similar way to database tables. 



Types of Temp table


a. Local temporary tables

These tables are only visible to the current user connection and are deleted when the user disconnects. Local temporary tables are prefixed with a single number sign (#).


b. Global temporary tables

These tables are visible to any user after they are created and are deleted when all users referencing the table disconnect. Global temporary tables are prefixed with two number signs (##).


Where are temp tables?

tempdb database

SQL Server temporary tables are a special type of tables that are created and stored in the tempdb database of SQL Server.

No comments:

Post a Comment