I need to get the next identity value from SQL Server
.
I use this code :
SELECT IDENT_CURRENT('table_name') + 1
This is correct, but when the table_name
is empty (and next identity value is "1") returned "2" but result is "1"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…