indexing - Re-index table in mysql -


i have table in database re-index.

because rows deleted, have :

id     name      phone 1      xxxx      xxxxx 4      xxxx      xxxxx 6      xxxx      xxxxx 

and like:

id     name      phone 1      xxxx      xxxxx 2      xxxx      xxxxx 3      xxxx      xxxxx 

id auto-incremented. change of id row won't have impact on rest of site, it's single , simple customer list.

i've searched on internet , found things repair table i'm not sure it's adapted case :/

thanks !

you can try dropping id field , re-create this:

alter table `my_table` modify column id int not null; alter table `my_table` drop primary key, add primary key(id); alter table `my_table` modify column id int not null auto_increment; 

i suggest trying on development database first ideally, or otherwise @ least duplicate table , try on first. don't want risk "production" data.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -