Test splitting OR conditions into disjoint UNION ALL branches, preserve NULL behavior and row identity, and compare actual index access.
SQL SERVER – Remove Duplicate Rows Using UNION Operator
The UNION operator removes duplicates from a query result without deleting source rows. I use a small example to show that distinction.
SQL SERVER – Puzzle – Solution – Why Does UNION ALL Work but UNION Produces Error?
Here is the answer to my puzzle: why does UNION ALL work but UNION produces an error with a TEXT column? It comes down to how UNION removes duplicates.
SQL SERVER – Puzzle – Why Does UNION ALL Work but UNION Produces Error?
A puzzle with TEXT columns: UNION ALL works fine, but UNION produces error. Can you tell why? The hint is in how UNION removes duplicates.
SQL SERVER – Select Unique Data From a Column Exist in Two Different Table
A reader wanted to Select Unique Data from a column in two tables, keeping only values found in just one of them. Here is the query that does it.
OPENJSON WITH Clause: Converting JSON Properties to Typed Values
Without WITH, OPENJSON hands you text. With it, you pick the names and types and decide what happens when a property is missing.
Interview Question of the Week #017 – Performance Comparison of Union vs Union All
Compare UNION vs UNION ALL with duplicate examples, compatible types, actual plans, and the extra work required for distinct rows.






