If I used @@IDENTITYsp in SQL, which also activated the trigger, would this lead to a race condition?
Let's say I execute INSERT INTO TABLE_A, which launches INSERT INTO TABLE_B, and then in the current area I use@@IDENTITY
Will I always get the resulting identifier from trigger ( TABLE_B) or will it depend on which thread finished first?
Note: I know about SCOPE_IDENTITY, this question is hypothetical ....
source
share