"Returns the last identity value inserted into an identity column in the same scope. A scope is a module: a stored procedure, trigger, function, or batch. Therefore, two statements are in the same scope if they are in the same stored procedure, function, or batch."
http://msdn.microsoft.com/en-us/library/ms190315.aspx
(Adica le executi una dupa alta)
Cătălin D.