December 13, 2007 at 1:24 pm
Hi,
I'm wondering about the following problem. I have a table with an identity column, and different applications that can add to this table. the problem I have is that when 2 different connections insert a new row, they each may do so before the other one has completed and committed the data.
So my question is the following: Is there an equivalent to @@IDENTITY for a given table? IDENT_CURRENT() will not work in this case since it's not limited to the current session like IDENTITY is. I'm really looking for something that provides me with the combination of both. SCOPE_IDENT() does not really look like it's what I want either...
Anybody has had this kind of problem? If so, how did you go about solving it?
Thanks,
Greg
December 13, 2007 at 1:41 pm
Ummm... actually, Scope_IDENTITY() is exactly what you want.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 13, 2007 at 1:49 pm
Ahhh... I see. I wish I could specify a table name but this is not bad at all actually, thanks a lot!
Jeff Moden (12/13/2007)
Ummm... actually, Scope_IDENTITY() is exactly what you want.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply