Reset AUTO_INCREMENT in MySQL

Reset AUTO_INCREMENT in MySQL

mysql with gaurav dixit

 SELECT @max := MAX(ID)+ 1 FROM ABC; 


PREPARE stmt FROM 'ALTER TABLE ABC AUTO_INCREMENT = ?';
EXECUTE stmt USING @max;

DEALLOCATE PREPARE stmt;

For more share and subscribe my Blog and drop here your comments. 

Post a Comment

Previous Post Next Post