Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to reset count for identity field?
Message
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00819923
Message ID:
00820394
Views:
10
Thanks, that's a handy SQL command—I'll keep it in mind for times that I don't need to be careful to preserve the data.


>The simplest way to reset your identity fields is to use the 'truncate table tablename' command on the sql server. This will remove all records and reset the identity.
>
>-Eric
>
>>I'm having trouble figuring out how to reset an identity field's sequential count in a table, after I manually delete one or more records.
>>
>>As it is, when I delete the last record in a table, the next record I add adopts the next higher number, as though I hadn't deleted it at all.
>>
>>I tried changing the seed, but that didn't help, so I set it back to 1.
>>
>>TIA,
>>Jeff

Read about the greatest fraud in the history of mankind.
See TaxableIncome.net.
Previous
Reply
Map
View

Click here to load this message in the networking platform