XML DataType Functions:
Function Description Query Gets a set of nodes from an XML document/fragment (returns XML) Value Gets a single value from an element or attribute of an XML document/fragment (returns scalar value) Exist Returns a Boolean value indicating if the XQuery expression returns values Modify Changes values in an XML document/fragment Nodes Gets a context to a node based upon the XQuery expression
The Following Query runs on AdventureWorks HumanResources.JobCandidate Table to get all Employee First Name & Last Name, Telephone Nos.
SELECT Resume . query ( 'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; data(/Resume/Name/Name.First)' ) FirstName , Resume . query ( 'declare default elemen...