How to reset identity of column | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to reset identity of column

suppose we assign identity of id column .. and Frist 5 rows are 1 2 3 4 5..and then are 11 12 13 14. ok ... I want all data is in a correct numerical order ... like 1 2 3 4 5 6 7 8 9

13th Mar 2017, 12:40 PM
Shravan Sawant
Shravan Sawant - avatar
1 Answer
+ 1
On MS SQL this will reset auto ID, the next record will have an ID of 1: DBCC CHECKIDENT ('TableName', RESEED, 0)
13th Mar 2017, 1:12 PM
Chris
Chris - avatar