Great SQL tip: @@IDENTITY==bad, scope_identity()==good

My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2003/11/12/great-sql-tip-identitybad-scope_identitygood.html
Published Wednesday, November 12, 2003 11:27 PM by RoyOsherove
Filed under:

Comments

Thursday, November 13, 2003 3:55 AM by Frans Bouma

# re: Great SQL tip: @@IDENTITY==bad, scope_identity()==good

scope_identity() is not supported in SqlServer 7. Consider that when using scope_identity() as it can cause code to become non-portable.
Thursday, November 13, 2003 4:11 PM by the0ther

# re: Great SQL tip: @@IDENTITY==bad, scope_identity()==good

Good grief! What a tip! What other commands do I need to avoid? The plus operator?

Oh well, I'm sending this around to some other people that I know. This'll be new to a lot of folks.
Wednesday, July 21, 2004 7:58 AM by TrackBack

# ADO.Net talk went great

Monday, August 21, 2006 12:34 PM by Dave London

# re: Great SQL tip: @@IDENTITY==bad, scope_identity()==good

I have recently come accross this one myself. @@identity is not thread safe. I think there will be a lot of developers unaware of this. It seems to have slipped under the radar for most.
Wednesday, January 21, 2009 10:35 PM by Communication Mixup | keyongtech

# Communication Mixup | keyongtech

Pingback from  Communication Mixup | keyongtech