You can ORDER BY a column alias, so why not use it in WHERE? A simple example that shows how SQL Server assigns a Column Alias and where it is in scope.
SQL SERVER – SPID is KILLED/ROLLBACK state. What to Do Next?
Your SPID shows KILLED/ROLLBACK and never seems to finish. Here is what that state means, why SQL Server sometimes cannot undo the work and what to do next.
Interview Question of the Week #033 – How to Invalidate Procedure Cache of SQL Server?
Clear procedure cache at the narrowest useful scope, remove one plan handle, and compare sp_recompile with statement recompilation.
Bring SQL Cluster Resource Online When It Sits in Online Pending
A client could start a SQL Server instance from services.msc but could not bring SQL cluster resource online in Failover Cluster Manager. Here is how I checked the connection and found the cause: a TCP alias with an old port.
SQL SERVER – Understanding the Basics of Write Ahead Logging (WAL) Protocol
Doing the basics right matters. Here is a simple, story-driven explanation of the Write Ahead Logging (WAL) protocol that keeps SQL Server transactions safe.






