I know this won\'t work, tried it in various forms and failed all times. What is the simplest way to achieve the following result?
ALTER TABLE XYZ AUTO_INCRE
Use a Prepared Statement:
SELECT @max := MAX(ID)+ 1 FROM ABC; PREPARE stmt FROM 'ALTER TABLE ABC AUTO_INCREMENT = ?'; EXECUTE stmt USING @max; DEALLOCATE PREPARE stmt;