title: add a node to xml column in select query
body: <p>I would like to add a node with a value from a table column. my example is below</p>
  
  <pre><code>declare @table table (bookid int,xmlCol xml)
  insert into @table
  select 1,
  '&lt;book title="you are not alone" author="Esther"&gt;
    &lt;EDITIONS&gt;
      &lt;edition year="2012"/&gt;
      &lt;edition year="2013"/&gt;
    &lt;/EDITIONS&gt;
  &lt;/book&gt;'
  
  declare @table1 table(bookid int,seller varchar(5))
  insert into @table1
  select 1,'xyz' 
  
  select ??? 
  from @table t
  inner join @table1 t1
  on t.bookid = t1.bookid
  </code></pre>
  
  <p>I want my final result to look like this</p>
  
  <pre><code>&lt;book title="you are not alone" author="Esther"&gt;
    &lt;EDITIONS&gt;
      &lt;edition year="2012"/&gt;
      &lt;edition year="2013"/&gt;
    &lt;/EDITIONS&gt;
   &lt;seller&gt; XYZ&lt;/seller&gt;
  &lt;/book&gt;
  </code></pre>
  
  <p>I DONT WANT TO UPDATE, i think it can be done in xquery but I could not find any example of how to do this. I had a similar question a while ago on adding an attribute and was satisfied with the answer by Roman Pekar. <a href="https://stackoverflow.com/questions/19138953/add-column-value-to-an-xml-field-as-an-attribute">add column value to an xml field as an attribute</a></p>