0

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?

DavidPostill
  • 7,734
  • 9
  • 41
  • 60
  • possible duplicate of [How to reset AUTO\_INCREMENT in MySQL?](http://stackoverflow.com/questions/8923114/how-to-reset-auto-increment-in-mysql) – s3lph Mar 31 '15 at 21:58

1 Answers1

1

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?

Community
  • 1
  • 1
John
  • 1,677
  • 4
  • 15
  • 26