An interview question: how do you print a string in reverse order in SQL Server? Here is how the candidate solved it, with the script.
Interview Question of the Week #051 – Actual Execution Plan vs. Estimated Execution Plan
Do you use the actual or the estimated execution plan? A candidate asked me this in an interview. I always use the actual plan, and here is why.
Interview Question of the Week #050 – Query to Retrieve Second Highest Salary of Employee
A classic interview question: write a query to retrieve the second highest salary, or any Nth highest, from an employee table using a correlated subquery.
Interview Question of the Week #049 – Taking Database Offline
Taking database offline is one line of T-SQL with ROLLBACK IMMEDIATE. But what if your boss wants to wait 30 seconds first? Here is that script too.
Interview Question of the Week #048 – How to Move TempDB to Another Drive?
Can TempDB be moved to a different drive? Yes. Here are two reasons to do it and the exact steps to move TempDB to another drive.
Interview Question of the Week #047 – Logic To Find Weekdays Between Two Dates
How do you find weekdays between two dates in SQL Server? Here is a simple user defined function that loops through the dates and skips Saturday and Sunday.
Interview Question of the Week #046 – How @@DATEFIRST and SET DATEFIRST Are Related?
How are @@DATEFIRST and SET DATEFIRST related? One sets the first day of the week for your session, the other reads it back, and language matters too.







