Denali lets you execute a stored procedure with result sets and rename its columns at run time, with no temp table needed. Here is a quick script.
XQuery Node Identity: Equal Text Can Be Different Nodes
XQuery node identity compares source nodes, not their text. Use is beside text equality to distinguish repeated values from the same node.
SQL SERVER – How to ALTER CONSTRAINT
Can you ALTER CONSTRAINT in SQL Server? No. The only way to change a constraint is to drop it and create it again, and here is the script for that.
SQL SERVER – How to Use Decode in SQL Server?
CASE expresses the DECODE mapping in this SQL Server example. I keep the named matches and default value explicit.
SQL SERVER – Prevent Constraint to Allow NULL
Why does a CHECK constraint allow NULL? A reader thought it was a bug. I show why it happens and how to write the constraint so NULL is rejected too.
geometry STDistance: Measure the Closest Points of Two Shapes
geometry STDistance measures the shortest distance between points belonging to two represented shapes. I compare an interior gap with an endpoint gap. Intersecting shapes provide a useful zero-distance case.
SQL SERVER – Applying NOLOCK Hint at Query Level – NOLOCK for whole Transaction
Can you apply the NOLOCK hint to a whole query with OPTION (NOLOCK)? No, it fails with Msg 102. Here is how I use an isolation level instead.






