Why does WHERE say the alias does not exist? Here is the order SQL Server follows, two clean fixes and one quiet trap to avoid.
SQL Code Comments: Notes Your Future Self Can Read
SQL Code Comments are the notes SQL Server skips and your teammates read. This post shows the two comment styles, what is worth writing in them, a header block for scripts and procedures, and how to stop a comment from lying after the code changes.
Enforcing Object Naming Rules With a DDL Trigger
Enforce procedure and index names with a DDL trigger, inspect EVENTDATA, audit rejected attempts, and list existing violations.
Formatting T-SQL Consistently Across a Team
Formatting T-SQL consistently means choosing a few readable rules, using a formatter carefully, and keeping historical changes focused.
Autocomplete and Code Formatting in SSMS: What Works Today
Autocomplete and code formatting save time and prevent mistakes when they are set up well. This post covers the IntelliSense features in SSMS, the reasons they stop working, a simple formatting style, and a tested look at what formatting changes in the plan cache.
Naming Conventions for Tables, Columns and Constraints
Use naming conventions for readable SQL Server tables, columns, keys and indexes, then find exceptions and plan safe renames with sp_rename.







