SQL FOR XML PATH

The Path mode with FOR XML in SQL Server returns a result set as the XML element. Unlike other XML modes, this FOR XML PATH mode provides control over the generated XML file. It is because FOR XML path mode treats column names and alias names as the XPath expression. For this SQL FOR XML PATH mode … Read more