DECLARE @v VARCHAR(MAX)SET @v = '<Root><Age>45</Age></Root>'DECLARE @xml XMLSET @xml = @vSET @xml.modify(' replace value of (/Root/Age/text())[1] with "20" ')select @xml