title: SQL Server FOR XML
body: <p>I have a table in SQL Server that looks like any other table with the column names below: </p>
  
  <pre><code>primaryID | column1 | column2 | column3| column4 | column5
  </code></pre>
  
  <p>I need to grab the different fields in that table and create an XML in the following format: </p>
  
  <pre><code>&lt;Record&gt;
  &lt;Field id="column1" value="ABCDEFG" /&gt;
  &lt;Field id="column2" value="Some text" /&gt;
  &lt;Field id="column3" value="Some other text" /&gt;
  &lt;Field id="column4" value="myValue" /&gt;
  &lt;Field id="column5" value="88" /&gt;
  &lt;/Record&gt;
  </code></pre>
  
  <p>In this scenario, the  node is created for each record in the table. The  node is done for every column for that particular record. 
  I have tried every possible combination of RAW, PATH, ROOT, and EXPLICIT to no avail.</p>
  
  <p>Is what I'm proposing even possible in SQL Server or do I need to do it somewhere else?</p>