Reset AUTO_INCREMENT in MySQL
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.
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.
🖥️💡 Boost Minds - Through IT Education 🌐 🔍 Explore. 💻 Innovate 📚 Learn A journey of endless possibilities! 🚀 #code #learning #codedixa
0 Comments