title: How can return identity column value from table and insert other table in SQL Server?
body: <p>I'm beginner in SQL Server and in my database I have two tables:</p>
  
  <ul>
  <li>Table 1 with an id type <code>bigint identity(1, 1)</code></li>
  <li>Table 2 with the columns name and <code>table1ID</code>.</li>
  </ul>
  
  <p>I want to insert (into table 1) and generate an id value. Then I will insert that id value into <code>table1ID</code> of table 2.</p>
  
  <p><br/>
  i change table to this and write this query:<br/></p>
  
  <pre><code>insert into Interconnect_Traffic_Analysis_MAIN   (Code_Op,Name_Op,Shomare_Tel,Duration,table1ID&gt;&gt;table1 id must save in this column) 
  select  t7,t8,t9,t10 from Interconnect_Traffic_Analysis_Temp;
  </code></pre>
  
  <p>But how can I implement that?</p>