数据库表自增ID批量清零

数据库表自增ID批量清零

mysql数据库表自增ID批量清零 AUTO_INCREMENT = 0

#将数据库表自增ID批量清零
SELECT CONCAT( 'ALTER TABLE ', TABLE_NAME, ' AUTO_INCREMENT = 0;' )
FROM information_schema.tables
WHERE table_schema = 'DBNAME'
LIMIT 0 , 10000;
05-07 15:43