Learn to write a hierarchical query using a recursive CTE with a short video and a quiz on an employee and manager table. Check your answer.
SQL SERVER – A Tricky Question and Even Trickier Answer – Index Intersection – Partition Function
Can one table, used once, give 2 join operators in an execution plan? Readers used ranking functions, and my own answer relies on index intersection.
SQL SERVER – A Puzzle – Illusion – Confusion – April Fools’ Day
A light puzzle for April Fools’ Day: two division queries that look the same in SSMS. Will they return the same result, and why?
SQL SERVER – Solution Part 2 – A Quick Puzzle on SQL JOIN and NULL – SQL Brain Teaser
Part 2 of the solution to my puzzle on SQL Join and NULL. Readers still email me answers every day, so here are more of the good ones they sent.
SQL SERVER – Solution – A Quick Puzzle on JOIN and NULL – SQL Brain Teaser
The solution to my quick puzzle on JOIN and NULL. Many readers said the puzzle had an error; it did not, and here is the answer that works.
SQL SERVER – A Quick Puzzle on JOIN and NULL – SQL Brain Teaser
A relaxing SQL Brain Teaser on INNER JOIN and NULL: set up a sample table, look at the result, and fill in the missing T-SQL that produces it.
SQL SERVER – INNER JOIN Returning More Records than Exists in Table
Can an INNER JOIN returning more records than exist in a table be right? Jeff thought it was a bug. Our chat shows why it is possible and natural.






