View Single Post
  #4 (permalink)  
Old July 23rd, 2003, 06:10 AM
Jeff Mason Jeff Mason is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Hudson, MA, USA.
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

The use of IDENT_CURRENT() in this situation is not wise. IDENT_CURRENT() returns the last identity value used for the indicated table across all connections. Thus, it is quite possible that you could run into concurrency issues (another user also inserts into 'Table1'). Much better to use scope_identity() here.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
Reply With Quote