有没有办法将这两个替换值与 1 个更新语句结合起来?
UPDATE dbo.MyTable
SET MyXmlColumn.modify('replace value of (/node/@att1)[1] with "1"')
WHERE id = 1
UPDATE dbo.MyTable
SET MyXmlColumn.modify('replace value of (/node/@att2)[1] with "2"')
WHERE id = 1
http://msdn.microsoft.com/en-US/library/ms190675(v=SQL.90).aspx