Expand Minimize
1 out of 1 rated this helpful - Rate this topic

Returns the last-inserted identity value.



SELECT @@IDENTITY AS TEMPNAME
or
SELECT @@IDENTITY AS [TEMPNAME]
or
SELECT @@IDENTITY AS "TEMPNAME"

numeric


If you create a table in SQL Server Compact 3.5 that uses an identity column and then run a query in which an INSERT fails, the value of @@IDENTITY will still increment.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.