title: SQL: How can I get the value of an attribute in XML datatype?
body: <p>I have the following xml in my database:</p>
  <pre><code>&lt;email&gt;
    &lt;account language=&quot;en&quot; ... /&gt;
  &lt;/email&gt;
  </code></pre>
  <p>I am using something like this now: but still have to find the attribute value.</p>
  <pre><code> SELECT convert(xml,m.Body).query('/Email/Account')
   FROM Mail
  </code></pre>
  <p>How can I get the value of the <code>language</code> attribute in my select statement with SQL?</p>