An untested backup is the darkest joke in the DBA world. Here’s how the story usually ends, and the simple restore drill that keeps you out of it.
SQL SERVER – Four Basic SQL Statements – SQL Operations
The four basic SQL statements are SELECT, UPDATE, INSERT and DELETE. A short note on what each one does, with a link to my one page FAQ sheet for full syntax.
SQL SERVER – SQL SERVER – Comparison : Similarity and Difference #TempTable vs @TempVariable – Part 2
Can a temp table have indexes? Yes. In Part 2 of #TempTable vs @TempVariable, I explain how temporary table indexes live in TempDB and when they help.
Readable IDs: A Bounded Computed Invoice Number
Create readable IDs with a computed invoice number while retaining the numeric key. Enforce the six-digit domain and plan format changes before growth.
SQL SERVER – Function Property – Deterministic or Non-Deterministic
How do you tell if a user defined function is deterministic or non-deterministic? One OBJECTPROPERTY call with IsDeterministic gives you the answer.
XQuery distinct-values: Deduplicate Atomic Values, Not Nodes
XQuery distinct-values removes repeated atomic values rather than selecting representative source nodes. I rebuild a small sorted XML result from repeated text. The example also keeps an empty document in view.







