Part two of my behind the scenes story of Practical Real World Performance Tuning: the fun we had in class and the reviews our students shared.
Alternate Row Colors in an HTML Table Using T-SQL
To get alternate row colors in an HTML table from T-SQL, number the rows with ROW_NUMBER and pick a color by odd or even. This post builds the whole table with STRING_AGG, escapes special characters, colors one cell by value, and explains why the numbering must follow the display order.
How to Find Service Account for SQL Server and SQL Server Agent? – Interview Question of the Week #179
How do you find the Service Account for SQL Server and SQL Server Agent? Here are three ways: Configuration Manager, services.msc, and a T-SQL query.
SQL SERVER – Save Auto Recover Information – SSMS
SSMS can save your unsaved queries if it crashes, yet few people know the setting. Here is where to find Auto Recover under Tools, Options and why it matters.
Tally Table: Replacing WHILE Loops With a Set of Numbers
Use a tally table or GENERATE_SERIES to replace repeated date, character, and missing-number loops with ordered sets of rows.





