I was wondering if anybody knew a good way to create a unique random integer id for a primary key for a table. I\'m using MySQL. The value has to be integer.
AUTO_INCREMENT is going to be your best bet for this.
AUTO_INCREMENT
Here are some examples.
If you need to you can adjust where the increment value starts (by default it's 1).