I got a problem. I use SQL Server 2008 Express.
When new row is inserted into a table the IDENT_CURRENT
function returns correct value (last inserted row id). But when the last inserted row is deleted (DELETE FROM REPORT WHERE ID='last_inserted_id'
) the IDENT_CURRENT
function returns id of the deleted row. It do not update.
I need to return the last id from the table.
SELECT IDENT_CURRENT('report')