Hash: SHA1

Greetings Adam

On 21 November 2002 at 11:12:46 -0500 (which was 16:12 where I live) Adam
Voigt emanated these words of wisdom

> But if there are heavy operations on the site, will this not also pick
> up a different last inserted id, if in the split milisecond between the
> insert and the next mssql_query which has the @@identity say, another
> user does an insert?

No unless you drop the connection, but then it should give you a NULL. To
quote M$



IDENT_CURRENT is similar to the Microsoft® SQL Server™ 2000 identity
functions SCOPE_IDENTITY and @@IDENTITY. All three functions return
last-generated identity values. However, the scope and session on which
'last' is defined in each of these functions differ.

IDENT_CURRENT returns the last identity value generated for a specific table
in any session and any scope.

@@IDENTITY returns the last identity value generated for any table in the
current session, across all scopes.

SCOPE_IDENTITY returns the last identity value generated for any table in
the current session and the current scope.


- --
 Ti2GO,                    _______________________________________________
  David                   |    David  Elliott    |   Software Engineer    |
 _________________________| [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
| I didn't do it!  Nobody saw me do it!  You can't prove anything!        |

Version: 6.5.8ckt http://www.ipgpp.com/


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to