A safe insert does not make the saved value safe forever. Here is how stored text turns into code later, and the plain fix.
Filling Template Parameters in SSMS With Ctrl+Shift+M
Template parameters save you from typing one value in four places, but they only paste text. Here is what that means in practice.
XML modify(): Inserting, Replacing and Deleting Nodes
The modify() method edits XML in place, but a path that matches nothing changes nothing and says nothing. Here is how to stay in control.
Dynamic ORDER BY Without Injection: Whitelisting Sort Columns
Parameters cannot name a column, so grids end up gluing text into SQL. Here is the approved-list pattern that keeps the sort safe.
Compound Assignment Operators in SQL Server: SQL in Sixty Seconds #009
Compound assignment operators such as += and *= combine an operation with an assignment in T-SQL. The tests here run all eight operators on SQL Server 2025, and show how NULL, integer division, overflow, truncation and precedence change the result.
Table Variables and Transactions in SQL Server: SQL in Sixty Seconds #007
Table variables and transactions do not mix the way temporary tables do, because a ROLLBACK leaves the rows in a table variable. The tests here cover a full rollback, a savepoint, a failed statement and a logging pattern, all on SQL Server 2025.
Declare and Initialize Variables in SQL Server: SQL in Sixty Seconds #003
To declare and initialize variables in one statement, give each variable a type and a starting value in the same DECLARE. The tests here show the NULL default, a loop that does not reset an uninitialized variable, and the one character varchar trap on SQL Server 2025.







