A CASE Expression can appear in a default, but cannot reference another row column there. My earlier blanket prohibition was incorrect.
Self-Referencing Foreign Keys: Managers, Employees and Deletes
Delete a manager and SQL Server says no, which is good. See how to reassign reports safely and how to catch loops the foreign key allows.
SQL SERVER – Find Instance Name for Availability Group Listener
An Availability Group Listener identifies a connection endpoint rather than a separate engine instance. I query where this connection actually arrived.
Query Hints on a View in SQL Server: Where OPTION Goes
Query hints on a view cannot sit inside the view. Learn where OPTION goes, what a view may contain, and how Query Store hints help.
SQL SERVER – Altering Column – From NULL to NOT NULL
Altering Column nullability to NOT NULL requires resolving existing NULLs under an approved data rule. A customer used empty strings.
Find Damaged Pages in SQL Server With suspect_pages
Find damaged pages in SQL Server by reading msdb.dbo.suspect_pages. Decode the event type, find the table behind each page and know what to do next.
Freeze a Table With a Read Only Filegroup in SQL Server
Freeze a table by placing it on a READ_ONLY filegroup. See what fails, how to move a table in, and how to undo it in SQL Server.







