geometry STGeometryType identifies the represented shape type, which carries more information than its dimension. I compare single and multiple shapes in one small query. Equal dimensions do not mean that their structures are interchangeable.
SQL SERVER – Running Multiple Batch Files Together in Parallel
I needed SQL code running in parallel for a demo, so I used sqlcmd and start cmd.exe to run multiple batch files together. Can PowerShell do it better?
hierarchyid GetAncestor: Stop at the Root
hierarchyid GetAncestor returns a logical ancestor path. Its zero-distance result is the original node, while a request beyond the root returns NULL.
SQL SERVER – Concurrency Problems and their Relationship with Isolation Level
What are the four concurrency problems, like lost updates and dirty reads, and how does each one relate to the isolation level you pick in SQL Server?
SQL SERVER – Demo Script – Keeping CPU Busy
A demo script for keeping CPU busy: I wrote this query at an event to simulate high CPU usage, and it pushed CPU from 10% to 80%.
EXISTS: A Row Containing NULL Still Exists
EXISTS answers whether qualifying rows exist. Keep missing values separate from missing rows and preserve the intended correlation.
Sorting Correctly: Collation and ORDER BY
Collation and ORDER BY decide case, accent, and text-number order; choose rules explicitly when one report needs different sorting.






