On registration i am asking a username for a game. But like usual in games the username is already used. To prevent overload by trying multiple usernames i want to add a system like discord have.
Exusername #0001
Exusername #0002
To keep it simple i dont want to add more than 4 numbers after name.
How can i make a autoincrement field which is connected to the usename? Only if a user name is already used it should increment by one, else it starts by 1 withouth making a first fetch (there will be millions of rows). Or can you give me better advise to solve my issue ?
For example registration timeline:
Exuser1 -> 0001
Exuser2 -> 0001
Exuser3 -> 0001
Exuser2 -> 0002
Exuser2 -> 0003