Database Coding Standards and Guidelines Part 2: skip SELECT *, use SET NOCOUNT ON, prefer CTEs over temp tables, avoid cursors, and more query tips.
SQL SERVER – Database Coding Standards and Guidelines Part 1
Database Coding Standards and Guidelines Part 1: naming rules for tables, stored procedures, triggers, indexes, primary keys and foreign keys.
Coding Standards: A Short Guide and a Practical Naming Check
Useful SQL coding standards give teams a short rule set with clear exceptions. Run a read-only naming report, check literal underscores in procedure prefixes and review the results before changing objects.
Composite Keys: Match Complete Pairs Instead of Separate Lists
Composite keys need a complete pair match when the allowed values are defined together. I don’t split the components into independent lists. Doing so can admit combinations that were never allowed.
IIF and CASE: Control Return Types and Use Typed NULL Values
IIF and CASE choose result values, but their branches also define a shared return type. I make that type explicit when mixed inputs could surprise the reader. Typed NULL values help describe the same output contract.





