sql server 2008 - how to get next Identity not the last inserted identity of Identity column -


i have 2 table purchase , purchaseproduct purchase has primary key auto increment identity column possilbe next identity of identity column , lock nothing can wrong insert in purchaseproduct table

you don't need "lock" identity value. table uses value of identity, it's used forever, if rollback. sql fiddle example: http://sqlfiddle.com/#!3/5fdb9/1/0. note ids make table, 1 , 5.

if doesn't address problem, please revise question.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -