Two ideas with examples: transactions have no effect on local variables, and an UPDATE applies all its changes at once, which lets you Swap Variables in one go.
JSON_QUERY or JSON_VALUE: Match the JSON Shape
JSON_QUERY or JSON_VALUE depends on the JSON shape you need. One read-only document exposes scalar, object, array, JSON null and missing-path results side by side.
OLE DB or ODBC for Connecting to SQL Server
Choose OLE DB or ODBC for SQL Server by the component you run, especially SSIS, linked servers, and applications using current drivers.
SWITCHOFFSET Versus TODATETIMEOFFSET: Two Offset Operations
SWITCHOFFSET versus TODATETIMEOFFSET depends on the input contract. Preserve a known instant or attach an offset to a genuinely local clock.
STR: Check Width and Reduced Decimal Places
STR can reduce decimal places when its requested width cannot hold the complete fractional display. I inspect the complete text, including spaces and signs. A populated result does not guarantee that the number remains visible.
Patching an Availability Group in the Right Order
Patching an Availability Group safely means updating secondaries first, checking synchronization, failing over, and updating the old primary.
What Is a Database Schema in SQL Server?
A database schema is a namespace inside a database. What dbo really is, why two tables can carry the same name, how a schema makes permissions something you set once, and why naming it in your code saves you from odd bugs.







