Search code examples
mysqlauto-increment

MySql auto_increment plus a certain number


I want my the id field in my table to be a bit more " random" then consecutive numbers.

Is there a way to insert something into the id field, like a +9, which will tell the db to take the current auto_increment value and add 9 to it?


Solution

  • You have a design flaw. Leave the auto increment alone and shuffle your query result (when you fetch your data)