title: Inserting a identity column value into another table
body: <p>Good Morning. I have two tables, and one references the other. When I insert into the primary table, the primary key is auto-generated, viz Identity field. I need to insert this value into the second table. </p>
  
  <p>I found out using the OUTPUT clause will give me the just inserted identity value, ans so I tried this.</p>
  
  <pre><code>insert into owners (pId) 
     insert into personal (firstName) 
     output inserted.pId 
     values ('fn')
  </code></pre>
  
  <p>It doesn't work though. I get an error:</p>
  
  <blockquote>
    <p>Incorrect syntax near the keyword 'insert'</p>
  </blockquote>
  
  <p>The personal table is the primary table, and the owners table contains the foreign key. 
  How can I do the required in SQL Server? </p>
  
  <p>I've got stuck-up here for the past two days...</p>