XML Data Type Methods in SQL Server: query, value, exist, modify and nodes

XML data type methods are the five functions you call on an xml column or variable: query(), value(), exist(), modify() and nodes(). Each gives back a different kind of answer: xml, a typed value, 1 or 0, a changed document or rows. This post runs all five on one small table of seeds, shows two common errors, and asks SQL Server what each method returns. Every result comes from SQL Server 2025.

Continue Reading

SQL Error Actions: What SQL Server Does After an Error

SQL error actions decide what runs after an error in SQL Server. This post shows statement termination, scope abortion, batch termination, connection termination and XACT_ABORT, with real results from three small stored procedures. It also covers what each reaction does to an open transaction and how TRY…CATCH changes the outcome.

Continue Reading