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 Respuesta
+ 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