How do you get the identity column value after an insert in SQL Server Compact 3.5?
Asked
Active
Viewed 3,379 times
3 Answers
4
I think what you want is @@IDENTITY:
SELECT @@IDENTITY AS Identity
This will return the value of the last identity inserted.

Matthew Jones
- 25,644
- 17
- 102
- 155
-
I didn't think SSCE supports sql batch statements, will have to check – Kumar Jul 30 '09 at 04:11
1
I guess you have to use @@IDENTITY. I figured compact would have SCOPE_IDENTITY(), but I guess not. Just try scope_identity to be sure. :)

JP Alioto
- 44,864
- 6
- 88
- 112