A function was causing CPU spikes. How many times was that function called, and at what cost? The SQL Server 2016 DMV dm_exec_function_stats shows it.
SQL SERVER – CREATE OR ALTER Supported in Service Pack 1 of SQL Server 2016
SQL Server 2016 Service Pack 1 introduced CREATE OR ALTER. I use it for repeatable deployments of supported object types.
How to Use OR Condition in CASE WHEN Statement? – Interview Question of the Week #102
How do you use an OR condition in a CASE WHEN statement? A tricky interview question, and how to write it so the logic works.
SQL SERVER – System Function @@IDLE to Find System Ideal Time
Running @@IDLE returns a number that is hard to read. Here is what this system function measures and how to turn it into idle time you can understand.
Telling Which Platform You Run On With SERVERPROPERTY EngineEdition
Read EngineEdition with edition and version properties, select platform-aware diagnostics, and avoid treating an engine family as a license.
How to Introduce Time Delay Between Two T-SQL Commands? – Interview Question of the Week #091
How do you introduce a Time Delay between two T-SQL commands? An interview question developers ask often, answered with WAITFOR DELAY.
SQL SERVER – How to Join a Table Valued Function with a Database Table
I use APPLY to Join a Table Valued Function with rows from another table. The example passes each customer’s delivery city.






