Reputation: 1
I have a database and 1 table with a list of users.
Everyone has their own id.
When I delete all users and create a new user the id is automatically is set to 30
Before I deleted the last user was 29.
How do I reset it so when I create a user it resets to 1?
Upvotes: 0
Views: 41
Reputation: 1717
This question is too general as it depends on the database. However, the most likely answer is probably:
ALTER TABLE tablename AUTO_INCREMENT = 1
See this post for more deets: How to reset AUTO_INCREMENT in MySQL?
Upvotes: 1