No subject


Mon Dec 7 19:53:44 CST 2009


Functions, "These scalar functions perform operations on and return
information about values, objects, and settings in Microsoft® SQL
Server(tm)." Among these system functions are @@ERROR, @@ROWCOUNT, and
@@TRANCOUNT.

Historically, global variables are identified with the double @ sign, and in
SQL Server 7, the ones above are recognized as functions, but they're still
*system* wide. --Not connection specific.

The full text on @@IDENTITY:
After an INSERT, SELECT INTO, or bulk copy statement completes, @@IDENTITY
contains the last identity value generated by the statement. If the
statement did not affect any tables with identity columns, @@IDENTITY
returns NULL. If multiple rows are inserted, generating multiple identity
values, @@IDENTITY returns the last identity value generated. If the
statement fires one or more triggers that perform inserts that generate
identity values, calling @@IDENTITY immediately after the statement returns
the last identity value generated by the triggers. The @@IDENTITY value does
not revert to a previous setting if the INSERT or SELECT INTO statement or
bulk copy fails, or if the transaction is rolled back.
--


I've not seen anywhere indicate that it is connection specific....

hope this helps (forgive my tone if it seems a little strong, been a bad
day)
sgd




More information about the thelist mailing list