Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top