Before you can turn XML into a result set, SQL Server needs it in memory. Here is how preparing XML in memory works, with a customer order example.
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – Shredding XML – Day 33 of 35
After streaming table data into XML, we go the other way. Shredding XML means turning XML data back into rows and columns that you can query.
Scalar Functions and Performance
Scalar functions can hide row-by-row work in SQL Server; learn when inlining helps, how to inspect eligibility, and when a set-based rewrite wins.
What Lock Escalation Is and How to Stop It
Understand lock escalation, confirm it with evidence, and reduce its impact through smaller transactions, better access paths, and modern locking.
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – Using Root With Auto XML Mode – Day 32 of 35
Beyond using root with Auto XML mode, the XML Path mode lets you show some data as attributes and some as elements. Here is how, with JProCo data.
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – Using Root With Auto XML Mode – Day 31 of 35
Add a root element to the Auto XML mode so your XML stream is well-formed, and give the root node a meaningful name with the ROOT keyword.
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series – What is XML Day 30 of 35
In What is XML Day 30, we use FOR XML RAW to output the Employee table as XML, then add ROOT to get a root node and well-formed XML.






