title: How does this query work in sql server
body: <p>I am using SQL Server 2012. This is a query that I do not understand:</p>
  
  <pre><code>declare @tempDoc xml
  
  set @tempDoc = '&lt;Root&gt;
  &lt;ProductDescription ProductID="1" ProductName="Hovercraft"&gt;
  &lt;Features&gt;
    &lt;Passengers&gt;60 passenger capacity&lt;/Passengers&gt;
    &lt;Performance&gt;Top speed: 200 KMPH&lt;/Performance&gt;
    &lt;Maintenance&gt;5 year parts and labor extended maintenance &lt;/Maintenance&gt;
  &lt;/Features&gt;
  &lt;/ProductDescription&gt;
  &lt;/Root&gt;';
  
  SELECT @tempDoc.query('/Root/ProductDescription/Features/Passengers');
  </code></pre>
  
  <p>The select returns this:</p>
  
  <pre><code> &lt;Passengers&gt;60 passenger capacity&lt;/Passengers&gt;
  </code></pre>
  
  <p>Can you please tell me what it does, does it delete the other nodes?</p>
  
  <p>I am not able to understand this.</p>