title: Getting the Id of a row I updated in Sql Server
body: <p>I'm trying to return the Id of a row I update in sql </p>
  
  <pre><code>UPDATE ITS2_UserNames
    SET AupIp = @AupIp
    WHERE @Customer_ID = TCID AND @Handle_ID = ID
  
    SELECT @@ERROR AS Error, @@ROWCOUNT AS RowsAffected, SCOPE_IDENTITY() AS ID
  </code></pre>
  
  <p>and I keep getting Null for the ID, how can I get this?</p>