WHERE TABLE_SCHEMA = '库名' AND AUTO_INCREMENT > 1;
清除数据并重置自增为1
SELECT CONCAT('TRUNCATE TABLE ', table_name, ';') AS `query` FROM information_schema.TABLES WHERE TABLE_SCHEMA = '库名';