How Stuff and ‘For Xml Path’ work in SQL Server?
Here is how it works: 1. Get XML element string with FOR XML Adding FOR XML PATH to the end of a query allows you to output the results of the query as XML elements, with the element name contained in the PATH argument. For example, if we were to run the following statement: By … Read more