The following query returns data as XML
SELECT ContactID, FirstName, LastName, Phone
FROM Person.Contact
ORDER BY ContactID
FOR XML AUTO,ELEMENTS
However, there're some NULL values in Phone column and it makes some Phone tag disappeared in returned XML. You need to modify this query so that all tags appear in the XML document. What should you do?
A. Add an XML index to the table that contains the product data.
B. Add the XSINIL argument to the ELEMENTS directive in the query.
C. Add a HAVING clause to the query.
D. Add the replace value of clause to the query.
Answer:[B]
Highlight to find out the answer.
Sunday, February 21, 2010
FOR XML
at 10:19 PM
Labels: SQL Server, SQL Server Test, SQL Server Tip
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment