-- 清空两个表并重置自增ID从1开始TRUNCATE TABLE ppt_template_pages;TRUNCATE TABLE templates;-- 如果需要强制指定起始值InnoDB 最小为1ALTER TABLE ppt_template_pages AUTO_INCREMENT 1;ALTER TABLE templates AUTO_INCREMENT 1;
【MySQL】如何不删除表并清空整个表
-- 清空两个表并重置自增ID从1开始TRUNCATE TABLE ppt_template_pages;TRUNCATE TABLE templates;-- 如果需要强制指定起始值InnoDB 最小为1ALTER TABLE ppt_template_pages AUTO_INCREMENT 1;ALTER TABLE templates AUTO_INCREMENT 1;