|
Posted by Erland Sommarskog on 09/05/05 14:18
Stu (stuart.ainsworth@gmail.com) writes:
> It sounds like you are using an IDENTITY column; if that's the case,
> then you can use IDENT_CURRENT to find the last generated IDENTITY
> value.
But beware of that IDENT_CURRENT is not safe from other processes. That is,
if you call IDENT_CURRENT before you insert a row, and the call
scope_identity() to see what you actually got, they may not be the same.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Navigation:
[Reply to this message]
|