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

Does SQL Server Support Custom Domains?

2026-07-05 · by Hannah Vernon · in t-sql

If you have spent time with PostgreSQL or Oracle, or read enough of the SQL standard to regret it, you have probably met the CREATE DOMAIN statement. A domain is a named, reusable type with…

IS DISTINCT FROM: Comparing NULLs Without the Headache

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

It usually shows up in a code review. Someone writes a filter that is supposed to exclude voided rows, it looks completely reasonable, and yet a tester swears that records are going missing. The query…

Self-Contained Transaction Scripts in SQL Server: the @debug_only Pattern

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

A safer alternative to the commented-out COMMIT habit: a @debug_only flag, SET XACT_ABORT ON, a named transaction, and an XACT_STATE guard that never leaves a transaction open.

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.

1 2 … 4 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
  • security
    • data security
  • service broker
  • SQL Server Agent
  • statistics
  • sys
  • t-sql
    • xml
  • tools
    • data masking
    • wsus
  • troubleshooting
  • Uncategorized

Pages

  • About SQL Server Science
  • 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