INFO: Retrieving IDENTITY Value for Referential Integrity
Article ID: 134660
Article Last Modified on 2/22/2005
APPLIES TO
- Microsoft SQL Server 6.0 Standard Edition
- Microsoft SQL Server 6.5 Standard Edition
- Microsoft SQL Server 7.0 Standard Edition
This article was previously published under Q134660
SUMMARY
The Microsoft SQL Server version 6.0 documentation says that you can use
the @@IDENTITY variable to retrieve the last-inserted identity value. The
documentation, however, does not completely state the scope of the
@@IDENTITY variable.
This article provides some additional information to clarify the scope of
the @@IDENTITY variable.
Additional query words: sql6 global variable
Keywords: kbinfo kbprogramming kbusage KB134660