January 22, 2006 at 10:12 pm
I need to create stored procedures which are used in web applications.
While after adding master record i need to add records to detail table. The master record created identity value which I will be using while inserting into
detail table. I am using @@IDENTITY to catch the identity value. Is it safer one in web based applicataions or any other method is ther to avoid contention.
Need help on this.
January 23, 2006 at 1:46 am
Use SCOPE_IDENTITY because SCOPE_IDENTITY identifies the last identity value for the current scope where as @@IDENTITY identifies the last identity regardless of scope.
January 23, 2006 at 2:13 am
Thanks a lot for the replay...
January 25, 2006 at 8:32 am
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply