Resetting Current Identity Value to New Value
use DBNAME
go
dbcc checkident(TABLENAME, reseed,seed value)
For Eg:
dbcc checkident(dbo.[User],reseed,1342)
which served my purpose.
To Get Current Identity Value
Also this seems to be useful. This gives the current identity value of the table.
use DBNAME
go
dbcc checkident(TABLENAME, noreseed)
For Eg:
dbcc checkident(dbo.[User],noreseed)
Please let me know your thoughts. Have a good day.
No comments:
Post a Comment