Conditions:
- Primary key should be auto incremented. Otherwise insertion would start from 0.
create temporary table tmp select * from my_table;
alter table tmp drop id;
insert into my_table select 0, tmp.* from tmp;
drop temporary table tmp;
Comments
Post a Comment