[dba-SQLServer] Another one on checkident

Susan Harkins ssharkins at gmail.com
Fri Jul 18 17:13:18 CDT 2008


It makes sense and I thought as much, but found it curious that the Help 
documentation refers to that value as the "current" value -- just a bad 
explanation I think. Thank you!

Susan H.


> CheckIndent only returns the last identity value, it does not tell you if
> the value is still in the table, just the last one hence you can use
> CheckIndent to reseed a table and start the seed at let's say 5mil
> 5,000,000. otherwise it's the current id value case in point... you have 
> two
> users who insert a record into your table, however let's say the 2nd 
> insert
> occurred before your program ran the checkIndent, then you'll end up with
> the 2nd users' Identity value instead of the one you were really after,
> yours.  To solve this issue I always use scope_identity, but even that 
> will
> not tell you that the record has been deleted.




More information about the dba-SQLServer mailing list