Back
How to drop multiple tables from one single database at one command. something like,
> use test; > drop table a,b,c;
> use test;
> drop table a,b,c;
where a,b,c are the tables from database test.
For Example:
Assume table A has two children B and C. Then you can use the following syntax to drop all the tables:
DROP TABLE IF EXISTS B, C, A;
This can be placed at the beginning of the script instead of individually dropping each table.
31k questions
32.8k answers
501 comments
693 users