title: How to update all xml attributes' value in an xml variable using t-sql?
body: <p>Let's have a sample snipet</p>
  
  <pre><code>DECLARE @xml XML = N'
  &lt;a abb="122"&gt;
      &lt;b&gt;
      &lt;/b&gt;
  &lt;/a&gt;
  &lt;a abb="344"&gt;
      &lt;b&gt;
      &lt;/b&gt;
  &lt;/a&gt;
  ...
  ';
  SELECT @xml;
  
  --need to update abb to be 888 in @xml here
  
  SELECT @xml;
  </code></pre>
  
  <p>We can update one attribute at a time as showed <a href="https://stackoverflow.com/questions/5338425/how-to-update-an-xml-attribute-value-in-an-xml-variable-using-t-sql">here</a>. The new question is: How can we update all at-a-time occurences of attribute <code>abb</code>?</p>
  
  <p>Please help.</p>