You can use a table alias in SELECT just fine, but how does a Table Qualifier work in the column list of an INSERT statement? Try this short puzzle.
How to Reduce High Virtual Log File (VLF) Count? – Interview Question of the Week #162
Found a high Virtual Log File (VLF) count in your database? Here are the steps I follow to bring the count down, starting with the log file details.
SQL SERVER – Puzzle – Get the First Name From Full Name Without CHARINDEX
This First Name From Full Name puzzle excludes CHARINDEX and SUBSTRING. It came from a customer query during a performance health check.
Sort in TempDB for Faster Index Rebuilds: When It Helps
To sort in tempdb during an index rebuild, add WITH (SORT_IN_TEMPDB = ON) to ALTER INDEX. This post tests the option and shows that the user database log stays the same size, because only the sort workspace moves. It also explains when the option helps, how much tempdb space it needs, and when to leave it off.
How to Get VLF Count and Size in SQL Server? – Interview Question of the Week #161
How do you get VLF Count and size in SQL Server? Newer versions add a Dynamic Management Function for it. Here is the query, plus links to my older methods.






