自增归0
SELECT concat('ALTER TABLE ', table_name, ' AUTO_INCREMENT=1;')
FROM information_schema.tables
WHERE table_schema='auction';
删除表
SELECT concat('DROP TABLE ', table_name, ';')
FROM information_schema.tables
WHERE table_schema='auction';
批量修改表前缀
SELECT CONCAT( 'ALTER TABLE ', table_name, ' RENAME TO buy_', substring(table_name,9 ),';' )
FROM information_schema.tables
Where table_name LIKE 'shopping_%';