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
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
|
0 comments :
Post a Comment