Permanent reorder MySQL table records on specific column
create table student_tmp select id, name, phone, email from student order by name;
alter table student_tmp modify column `id` int(10) primary key unsigned not null auto_increment;
drop table student;
alter table student_tmp rename to student;
Comments 0