show-notice
hide-notice

Wednesday, 17 July 2013

Modifying XML Data in Sql Server


Introduction 

The xml data type column can be modified using the new modify method in conjunction with UPDATE, allowing you to insert, update, or delete an XML node in the xml data type column.
This example demonstrates the modify method by inserting a new item into an existing XML document (specifically, a new item into the /BookInvoice/OrderItems node):

Example
UPDATE dbo.BookInvoice
SET BookInvoiceXML.modify
('insert
into (/BookInvoice/OrderItems)[1]')
WHERE BookInvoiceID = 2



SHARE THIS POST   

0 comments :

Post a Comment

Design by Gohilinfotech | www.gohilinfotech.blogspot.com