MySQL: Changing order of auto-incremented primary keys?
- by Tom
Hi,
I have a table with a auto-incremented primary key: user_id.
For a currently theoretical reason, I might need to change a user_id to be something else than it was when originally created through auto-incrementation. This means there's a possibility that the keys will not be in incremental order anymore:
PK:
1
2
3
952 // changed key
4
5
6
7
I'm wondering whether this will cause problems, and whether MySQL reads something special to the incremental order of the keys, given that they should have come to existence in incremental order (which persists even when some rows are deleted).
Assuming there are no associated foreignkey issues, or that these are under control, is there a problem with "messing with" the order of MySQL's autoincremented keys?
Thank you.