Drop multiple tables in one shot in mysql
问题 How to drop multiple tables from one single database at one command. something like, > use test; > drop table a,b,c; where a,b,c are the tables from database test. 回答1: Example: Let's say table A has two children B and C. Then we can use the following syntax to drop all tables. DROP TABLE IF EXISTS B,C,A; This can be placed in the beginning of the script instead of individually dropping each table. 回答2: SET foreign_key_checks = 0; DROP TABLE IF EXISTS a,b,c; SET foreign_key_checks = 1; Then