How do you get the identity column value after an insert in SQL Server Compact 3.5?
+1
A:
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
2009-07-29 21:33:41
I didn't think SSCE supports sql batch statements, will have to check
Kumar
2009-07-30 04:10:10
+1
A:
I think what you want is @@IDENTITY:
SELECT @@IDENTITY AS Identity
This will return the value of the last identity inserted.
Matthew Jones
2009-07-29 21:34:39