I have a table with the columns: (this is only an example I have 50K records)
Name, Number Joe Null Michael Null Moses Null
I to u
You could try setting the Number to AUTO_INCREMENT so the numbers will be generated:
Number
ALTER TABLE your_table MODIFY Number INT AUTO_INCREMENT
Other than that, you probably need: a) stored routines b) application code