MySQL batch deletes the specified prefix table bitsCN.com
Select CONCAT ('drop table', table_name, ';') FROM information_schema.tables Where table_name LIKE 'dede _ % ';
"Dede" is the prefix of the table to be deleted. after this SQL statement is executed, a series of SQL statements are generated. you must execute the generated SQL statements before deleting the table.
You can also modify table names in batches:
Select CONCAT ('alter table', table_name, 'Rename TO ', table_name,'; ') FROM information_schema.tables Where table_name LIKE 'dede _ % ';
First, execute this SQL statement and generate the following statement:
Alter table de_aaa rename to de_aaa; alter table de_bbb rename to de_bbb;
In the editor, change "rename to de" TO the table prefix you want TO set in batches, and then execute this SQL statement TO modify the table names in batches.
BitsCN.com