dragonwell
Programmer
I added an AFTER INSERT trigger to a table. Unfortunately, some application code is using @@IDENTITY to get back the value of the identity column from that table. The trigger does an insert into another table, so @@IDENTITY returns the identity value from that second table and breaks the app. I know we should use SCOPE_IDENTITY(), but is there any way to prevent the insert statement in the trigger from changing the @@IDENTITY value generated by the previous table?