 <p>I guess you need this one,</p> <pre><code>UPDATE [Table] SET Active = 1, Subscribed = 1, RenewDate = GETDATE(), EndDate = DATEADD(mm,1,getdate()) OUTPUT INSERTED.TABLE_PrimaryKeyID WHERE SC = @SC AND Service = @Ser </code></pre> <p>Main source: <a href="http://stackoverflow.com/questions/1610509/getting-the-id-of-a-row-i-updated-in-sql-server">here</a></p>