Sqlserver Interview questions

Total available count: 45
Subject - Databases
Subsubject - Sqlserver

Explain the difference between a Local and a Global temporary table?

Local temporary table:-
A local temporary table exists only for the duration of a connection or, if defined inside a compound statement, for the duration of the compound statement.
Global temporary table:-
1. Global temporary tables are visible to all sessions
2. Global temporary tables are dropped when the session that created it ends, and all other sessions have stopped referencing it

Next 5 interview question(s)

What is the difference between UNION and UNION ALL?
What are the authentication modes in SQL Server?
What are the properties and different Types of Sub-Queries?
When is the use of UPDATE_STATISTICS command?
What is difference between DELETE and TRUNCATE commands?