I have to create several hundred users using mysql. How do I know which user IDs to give them? I don't want to duplicate already-in-use IDs, so is there a way to check which IDs are safe to use for new users?

1 Answer 1


You don’t give them IDs. The user ID column in the database is an ‘auto increment’ column, meaning that the value is automatically created whenever a row is added. So just add your users without an ID and the database will create one for you.

  • I thought we were going to test this last Monday but there are delays, haha anyway, you are saying to just leave the ID col blank for each of the new users?
    – brothman01
    Jun 20, 2019 at 0:36
  • Yes, that's right. Jun 20, 2019 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.