XML DML UPDATING XML COLUMNS 153 5 Vanilla Ice Cream 1.50 154 20 Chocolate Ice Cream 1.50 go xml.modify( delete . . . ) The deleteXML DML command, as input to the modifyfunction, deletes zero or more nodes that are identified by the output sequence of the XQuery query following the keyword delete. As in SQL, you can qualify the deletestatement with a whereclause. The general syntax of deleteis: delete Expression Each node returned by Expressionis deleted. Returning a sequence of zero nodes just deletes zero nodes; it is not an error. As with the insert command, attempting to delete a constructed node (a node that was produced earlier in the query rather than a node in the original document) will cause an error. Attempting to delete a value rather than a node will result in an error. Also, attempting to delete a metadata attribute, such as a namespace declaration, will result in an error. To delete all the LineItem elements in our example, you could execute the following statement: set @x.modify( delete /Invoice/LineItems/LineItem ) xml.modify( replace value of . . . ) Unlike a searched UPDATE in SQL and also unlike xml.modify ( delete… ), xml.modify( replacevalueof… )modifies the value of a single node. It is not a searched UPDATE that uses a WHERE clause to select a sequence of nodes. The general syntax for update follows. replace value of Expression1

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Tomcat Web Hosting services

Bookmark the permalink.

Comments are closed.