Home > Articles > Data > SQL Server

  • Print
  • + Share This


The xml data type introduced in the SQL Server 2005 release gives you powerful methods that you can use to query and modify XML documents stored in the table columns or stored procedure variables. You can use the exist() method to test whether a specified XPATH expression is present in the XML document, the value() method to extract a single value from the XML document, and the query() method to select a subset of the XML document.

The nodes() method is extremely useful when you want to shred the XML document into individual nodes and store them into separate tables or use them in a cross-join to simulate the multi-value fields available in non-relational database implementations (for example, in Lotus Notes).

The modify() method implements a complete data modification language that can be used to delete parts of the XML document, insert new XML fragments into it, or modify the values of tag attributes or text nodes in the document.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.