Search This Blog

What is IDENT_CURRENT function in T-SQL?

IDENT_CURRENT started to be available by SQL Server 2000. It returns
the last identity value set on a specified table in any scope of any
process. In order to use it, simply provide the table name as a
parameter:

Select IDENT_CURRENT('TableName')

The value may be equal to values obtained using other identity (such
as @@IDENTITY and SCOPE_IDENTITY) or MAX functions, but it may also be
different.