Build a personal reference of dependable SQL examples with problem-based names, clear prerequisites, dated validation, and regular review.
SQL SERVER – Solution of Puzzle – Swap Value of Column Without Case Statement
Readers sent more than 50 answers to my swap puzzle. Here are 5 different ones that swap a column value without CASE statement, plus my own three.
SQL SERVER – Service Broker and CAP_CPU_PERCENT – Limiting SQL Server Instances to CPU Usage
Jeff said my Resource Governor script did not limit CPU at all. After a few emails we found why, and how CAP_CPU_PERCENT really limits CPU usage.
Resource Governor Workload Groups and Pools: A Simple Setup Example
Resource Governor workload groups let you limit CPU and memory for competing workloads. This introduction answers what Resource Governor is and why you need it, then shows a full T-SQL setup example.
SQL SERVER – A Puzzle – Fun with SEQUENCE in SQL Server 2012 – Guess the Next Value
A fun puzzle on SEQUENCE in SQL Server 2012: a sequence starts at 3 and cycles with a maximum of 5. Can you guess the next value it returns?
SQL SERVER – A Puzzle – Fun with NULL – Fix Error 8117
NULL is fun to ask about in interviews, since every answer I get is different. A short puzzle on NULL that raises Error 8117, and how to fix it.







