Essayez ceci : SET @var:=0; UPDATE `table` SET `id`=(@var:example@sqldat.com+1); ALTER TABLE `table` AUTO_INCREMENT=1;