title: How to use more than one table with OUTPUT clause?
body: <p>Is it possible to insert columns of different tables in the OUTPUT clause of an INSERT statement, such as:</p>
  
  <pre><code>DECLARE @insertedrecords TABLE (Id int, [Guid] uniqueidentifier);
  
  INSERT INTO mytable 
      (column names here...)
  OUTPUT inserted.id_no, b.[Guid] INTO @insertedrecords 
  SELECT 
      column names here...
  FROM @myTVP b
  </code></pre>
  
  <p>Currently, using the above I get the following error:</p>
  
  <blockquote>
    <p>The multi-part identifier "b.Guid" could not be bound.</p>
  </blockquote>