SQL Server Science
Technical Articles for the DBA / Developer
Home » t-sql » Page 5

Idempotent Data Patches in SQL Server: A Change Tracking Pattern for DACPAC Deployments

2026-06-06 · by Hannah Vernon · in t-sql

If you deploy your SQL Server databases with SSDT or DACPACs via SqlPackage, you have probably run into this problem: the schema deployment is repeatable, but the data patches are not. SSDT handles CREATE TABLE,…

SQL Server hierarchyid: A Built-In Alternative to Recursive CTEs

2026-06-04 · by Hannah Vernon · in t-sql

Learn how SQL Server’s hierarchyid data type stores and queries tree structures without recursive CTEs, with practical examples for org charts and hierarchical data.

Recursive CTEs in SQL Server: How the Parts Actually Work Together

2026-06-03 · by Hannah Vernon · in t-sql

A plain-language walkthrough of recursive CTEs in SQL Server, breaking down the anchor, the recursive member, and the iteration cycle so the syntax finally makes sense.

A Better Cursor Pattern for SQL Server: Cursor Variables and @@CURSOR_ROWS

2026-06-02 · by Hannah Vernon · in t-sql

Replace the traditional WHILE @@FETCH_STATUS cursor loop with a cleaner pattern using cursor variables, STATIC cursors, and @@CURSOR_ROWS for more readable, less error-prone T-SQL.

Should I use (max) size for all my nvarchar/varchar columns?

2026-04-29 · by Hannah Vernon · in Internals, performance, t-sql

Should you use VARCHAR(MAX) for all your string columns? No. Here’s why MAX costs you indexing, memory grants, and storage efficiency with demos you can run yourself.

Teaching GitHub Copilot Your T-SQL Coding Standards

2026-04-01 · by Hannah Vernon · in t-sql, tools

If you’re a DBA or database developer using GitHub Copilot CLI, you’ve probably noticed it generates functional T-SQL - but not necessarily T-SQL that matches your team’s coding standards. After several weeks of working with…

« Previous 1 … 4 5 6 … 8 Next »

Search

Categories

  • AI for DBAs
  • announcements
    • events
  • basics
    • localization
  • configuration
  • Data Architecture
  • DMVs
  • documentation
  • extended-events
  • Git for DBAs
  • High Availability
  • Hot Takes
  • Internals
  • maintenance
    • patching
  • Opinion
  • performance
  • PostgreSQL
  • Professional Development
  • recovery
  • reporting
  • ROLLBACK;
  • security
    • data security
  • service broker
  • SQL Server Agent
  • statistics
  • sys
  • t-sql
    • xml
  • tools
    • data masking
    • wsus
  • troubleshooting
  • Uncategorized

Pages

  • About Hannah Vernon
  • About SQL Server Science
  • Blog Series
    • Backup & Recovery from First Principles: Series Contents
    • Database as a Versioned Contract: Series Contents
    • Extended Events in Production: Series Contents
    • Git for DBAs: Series Contents
    • How SQL Server Stores Data: Series Contents
    • Logins, SIDs, and Kerberos from First Principles: Series Contents
    • Proving the Restore: Series Contents
    • T-SQL Style Guide, Tested: Series Contents
    • The UNKNOWN Problem: NULL Traps in T-SQL, Series Contents
    • Undocumented Changes in SQL Server 2022 and 2025: Series Contents
    • Work That Flows: Kanban for DBAs: Series Contents
  • Get Better Help with a Minimal, Complete, and Verifiable Example, or MCVE
  • Privacy Policy

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy

Copyright © 2026 SQL Server Science