Which FOR XML clause should you use in your query?

You are a database developer on an instance of SQL Server 2008. You have a ProductDetails table defined as follows:


You want retrieve data from the table in the following XML format:
<ProdData>
<ProductDetails ID="1" Name="Adjustable Race" ProdNum="AR-5381" />
<ProductDetails ID="2" Name="Bearing Ball" ProdNum="BA-8327" />
<ProductDetails ID="3" Name="BB Ball Bearing" ProdNum="BE-2349" />
</ProdData>
Which FOR XML clause should you use in your query?
A. FOR XML RAW, ELEMENTS, ROOT(‘ProdData’)
B. FOR XML AUTO, ELEMENTS, ROOT(‘ProdData’)
C. FOR XML AUTO, ROOT(‘ProdData’)
D. FOR XML PATH, ROOT(‘ProdData’)

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.