SQL Database Concepts Question: Download Questions PDF
Explain what is the difference between a Local and a Global temporary table?
Answer:
Temporary tables are used to allow short term use of data in SQL Server. They are of 2 types:
Local
Only available to the current Db connection for current user and are cleared when connection is closed.
Multiple users can’t share a local temporary table.
Global
Available to any connection once created. They are cleared when the last connection is closed.
Can be shared by multiple user sessions.
Local
Only available to the current Db connection for current user and are cleared when connection is closed.
Multiple users can’t share a local temporary table.
Global
Available to any connection once created. They are cleared when the last connection is closed.
Can be shared by multiple user sessions.
Download Basic SQL Server Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain what are the basic functions for master, msdb, model, tempdb databases? | List down some advantages of SQL Stored procedure? |