Sql date updating
An alternative to the above operation would be to select the XML value into a new XML variable, make the change, and then select the variable value: , on the same XML value.
In other words, only one instance of modify() may be used at the same time on the XML value.
We incorporated the SQL variable '@i' (inside of a sql:variable() extension function), which was used to iterate the Employee nodes.
Notice that the salary amount for employee # 4 was not updated, since that employee is in the Accounting department.
The DROP clause permanently drops the Phone column.
The following will fail: This is because modify() operates directly on the XML value, whether it is a column or variable, and cannot be used in an ad-hoc operation that does not update the underlying XML value.
(The two underscores represent any character.) The CASE expression returns a value for each row that completes the SET clause.