Interview question: how to kill processes idle for X hours in SQL Server? Here is a script that finds idle sessions and kills them.
How to Identify Session Used by SQL Server Management Studio? – Interview Question of the Week #151
An interview candidate asked us: how do you identify session IDs that SQL Server Management Studio is using? Here is a simple answer with sp_who2.
When to Use IDENT_CURRENT? – Interview Question of the Week #150
When should you use IDENT_CURRENT instead of SCOPE_IDENTITY()? A question I heard at the Group By conference, answered with the key difference.
How Many Temporary Tables are Created So Far in SQL Server? – Interview Question of the Week #149
How many temporary tables are created so far in SQL Server? No DMV gives this directly, but here is an easy workaround to find the answer.
How to Assign Multiple Variables in a Single T-SQL Query? – Interview Question of the Week #148
How do you assign Multiple Variables in a single T-SQL query? Here are three ways, from separate SET statements to my preferred one-line style.
How to Validate Email Address in SQL Server? – Interview Question of the Week #147
How do you validate an Email Address in SQL Server? Here is a simple query that separates valid addresses from invalid ones in a sample table.
What is WorkTable in SQL Server? – Interview Question of the Week #146
What is a WorkTable in SQL Server? Run a simple CROSS JOIN with STATISTICS IO on and you will see one. Here is what it is and why SQL Server creates it.







