BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft Exam 70-461 Topic 5 Question 3 Discussion

Actual exam question for Microsoft's 70-461 exam
Question #: 3
Topic #: 5
[All 70-461 Questions]

You are working with a table that has an XML column that contains information about books. Each book may have an associated price.

You need to write a query that returns each author on a separate row in XML format.

Which XML method should you use?

Show Suggested Answer Hide Answer
Suggested Answer: B

The nodes() method is useful when you want to shred an xml data type instance into relational data. It allows you to identify nodes that will be mapped into a new row.

The result of the nodes() method is a rowset that contains logical copies of the original XML instances. In these logical copies, the context node of every row instance is set to one of the nodes identified with the query expression, so that subsequent queries can navigate relative to these context nodes.

Incorrect Answers:

A: The Value() method performs an XQuery against the XML and returns a value of SQL type. This method returns a scalar value.

C: The Query() method specifies an XQuery against an instance of the xml data type. The result is of xml type. The method returns an instance of untyped XML.

D: The Exists() method returns a bit that represents one of the following conditions:

1, representing True, if the XQuery expression in a query returns a nonempty result. That is, it returns at least one XML node.

0, representing False, if it returns an empty result.

NULL if the xml data type instance against which the query was executed contains NULL.

References: https://docs.microsoft.com/en-us/sql/t-sql/xml/nodes-method-xml-data-type?view=sql-server-2017


Contribute your Thoughts:

Currently there are no comments in this discussion, be the first to comment!


Save Cancel