Identity Functions

To get information about identity available on table sql server provides following functions

ident_seed('tablename')

returns seed value of identity available on given table

ident_current('tablename')
returns current value of identity available on given table

ident_incr('tablename')
returns identity increament value for identity available on given table

select @@identity
this option is used to get identity value generated by last insert statements
 

Ebook Download
View all
Learn
View all