title: Transform a SELECT * query to string
body: <p>I have a query that returns a row </p>
  
  <pre><code>SELECT *
  FROM table
  WHERE id = 1;
  </code></pre>
  
  <p>I want to save the result into a nvarchar sql variable. I have seen similar questions <a href="https://stackoverflow.com/questions/4819412/convert-sql-server-result-set-into-string">Convert SQL Server result set into string</a> but they only use select with the name of the columns, never with *.</p>
  
  <pre><code>select *
  from table
  where id = 1
  for xml path ('')
  </code></pre>
  
  <p>However the answer is <code>&lt;column1&gt;value1&lt;/column1&gt; &lt;column2&gt;value2&lt;/column2&gt;</code> and I just want it to be <code>value1, value2</code></p>
  
  <p>Is there a way to achieve this? thank you!</p>