0

I'd like to create a mysql table that has 1000 rows. In each row I'd like to have a random number that is 8 digits in length. In addition, these numbers should be unique.

So basically I need to write something that:

  • Creates a random number that is 8 digits in length
  • Checks to see if that number has already been added to the table
  • If it hasn't already been added, add it now
  • Repeat this process until 1000 rows have been created.

Thanks in advance for your help!

Jonathon Doesen
  • 563
  • 8
  • 16

0 Answers0