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.
Why We Use Code Comments in SQL Server: Say Why, Not What
Why we use code comments comes down to one habit: write the reason, not the action. This post uses a small library table to show single-line and block comments, commenting out a join to test a theory, the Msg 156 trap, nested comments, and whether comments slow a query. Every result comes from SQL Server 2025.
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.
Comment T-SQL in SSMS: SQL in Sixty Seconds #019
You can comment T-SQL in SSMS with a keyboard shortcut, a toolbar button or the Edit menu. The tests here show nested block comments, an UPDATE that lost its WHERE clause, a dangling comma after a commented column, and an unclosed comment, on SQL Server 2025.







