IDENT_CURRENT
identity metadata
What changes
- Input
- a table's identity state (any session)
- Output or change
- last identity value
- Return type
- numeric(@@MAXPRECISION,0))
Syntax at a glance
IDENT_CURRENT( 'table_or_view' )
Work example
Inspect the current identity value for a named table during schema diagnostics.
Use SCOPE_IDENTITY or OUTPUT for an insert result that belongs to the current operation.
Check your work IDENT_CURRENT can reflect another session's insert and is not safe as the current caller's generated key.
Open Microsoft Learn for full syntax, permissions, and details for your version.