You are writing a query that returns data from tables in a SQL Server 2005 database.
Some of the data is stored in relational columns, and some of the data is stored in XML data type columns. Your query needs to return a relational result set that contains data from relational fields and attribute values from XML data type columns. Which two methods of the XML data type should you use? (Each correct answer presents part of the solution. Choose two.)
A.
the value() method
B.
the exist() method
C.
the query() method
D.
the nodes() method
E.
the modify() method
Explanation:
query() – Provides the ability to execute an XPATH or XQUERY expression and returns the resulting XML fragment.
value() – Provides the ability to execute an XPATH or XQUERY expression and returns a single scalar value that is converted into a SQL type.
exist() – Provides the ability to execute an XPATH or XQUERY expression to check for the existence of nodes. If the query returns a node collection, the exist() methods returns true; otherwise, the exist() method returns false.
modify() – Provides XML data-manipulation capabilities.
nodes() – Provides the ability to execute an XPATH or XQUERY expression and returns the resulting XML fragment shredded into row set.