I am trying out TDD and creating fake objects, I want to use XML from the test DB. Thus I want to create XML of the results of a query, which I am running in SQL Server Management Studio.
But I am unable to find how to get the results as XML in SQL Server Management Studio. Is this possible? And How?
You can use “
FOR XML” to output the results of a query to XML.For example: