How do you group data from multiple columns into one comma separated string per row, grouped by another column? Here is a sample dataset and the query.
Checking XML Index Size Against the Table It Belongs To
An XML index can outweigh the table it serves. Here is how I measure each XML structure next to the base table, and what to test before dropping one.
SQL Server Lessons: Five Short Scripts You Can Run in a Minute
SQL Server lessons stick when you can run them in a minute. This page covers errors, security, XML, hierarchies and query hints. Each lesson asks one question and answers it with a short script. Every result comes from SQL Server 2025.
XML modify(): Inserting, Replacing and Deleting Nodes
The modify() method edits XML in place, but a path that matches nothing changes nothing and says nothing. Here is how to stay in control.
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.
Plan Cache Key Lookups: Finding the Worst Ones With XQuery
Not every key lookup needs fixing. Rank statements by reads, find the lookups with XQuery, then test the smallest index change on one call.







