Unquoted procedure parameters work in SQL Server when the value is one plain word. This post builds a small procedure and tests which values fail without single quotes. It also shows how NULL, DEFAULT and numbers change the value.
Change Database and Table Collation – SQL in Sixty Seconds #145
I discussed the method to change the database and table collation with my client during the Comprehensive Database Performance Health Check.
Top N Plus Others: Grouping the Rest Into One Row
Create top N plus others summaries with deterministic category ranking, one remainder total, stable labels, and explicit display ordering.
Infinite Loop – SQL in Sixty Seconds #144
Lots of people wrote feedback about it and wanted me to explain in this video so I have built this new Video where I discuss Infinite Loop.
SQL SERVER – Change Database and Table Collation
To Change Database collation, I separate its default from existing character-column settings. The customer moved from case-insensitive to case-sensitive behavior.
WHILE 1 = 1 Loop in T-SQL: Run Forever, Stop Safely
A WHILE 1 = 1 loop never ends on its own, so every one needs a planned exit. This post builds a once-a-second sampler with three ways out, a stop flag, a round limit and a time limit, then shows how to stop a loop from a second window and what the recursion limit does.
Default Query Shortcuts in SSMS: Alt+F1, Ctrl+1 and Ctrl+2
The default query shortcuts in SSMS are Alt+F1, Ctrl+1 and Ctrl+2, and each runs a system procedure on the text you select. This post shows what sp_help, sp_who and sp_lock return, why sp_lock has a better replacement, and which keys you can change.







