How to get current identity number of specific table in sql server compact

Hamid picture Hamid · Jul 9, 2013 · Viewed 42.8k times · Source

I want to get current identity value of a specific table Like IDENT_CURRENT('table') in sql server

Answer

Samba picture Samba · Oct 20, 2016

If you want to get a last identity inserted value for a particular table use the following statement:

select IDENT_CURRENT('tablename')

For example:

select IDENT_CURRENT('Employee')