I have an id i.e primary key and auto increment. Is there any query to update my existing id and make my id start from 1 and next id 2
id
Of course there is a way:
set @counter = 0; update table_name set id = (@counter := @counter + 1);
EDIT
To avoid problem with duplicate keys you can run something like this before to temporary change current ids to negative equivalents:
update table_name set id = 0 - id;