fritserasmus Posted May 9, 2020 Share Posted May 9, 2020 I have a SQL database that I populate from IoT readings. It took me a lot of trail and many errors before I got to the point all readings are stored correctly for reporting. With about 12 sensors each storing a reading every 30 seconds, I have a huge number of records to delete. After successfully delete them I want to start fresh with record id # id is around 2,000,000. How do I reset id counter? Regards Frits Link to comment Share on other sites More sharing options...
Makwana Prahlad Posted July 1, 2020 Share Posted July 1, 2020 (edited) Hello Please try this query,To How to reset the id in a table The DBCC CHECKIDENT management command is used to reset identity counter. The command syntax is: DBCC CHECKIDENT (table_name [, { NORESEED | { RESEED [, new_reseed_value ]}}]) [ WITH NO_INFOMSGS ] i hope this query will be useful for you. Thank you. Edited July 1, 2020 by Makwana Prahlad Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now