title: How can i make an insert of a SCOPE_IDENTITY() into update in SQL SERVER
body: <p>I want to insert an id that i created into an update of each row:</p>
  
  <pre><code>    UPDATE TABLE1
      SET NAME=(INSERT INTO TABLE2(EVT01,EVT02) values(0,0)
      SELECT @id=SCOPE_IDENTITY() )
      FROM TABLE1
      INNER JOIN  TABLE2 ON ......
  </code></pre>
  
  <p>How can i make that in SQL Server?
  <br>Thanks.</p>