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.
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.
Then you do not have to worry about dropping them in the correct order, nor whether they actually exist.
N.B. this is for MySQL only (as in the question). Other databases likely have different methods for doing this.
Example:
Let's say table A has two children B and C. Then we can use the following syntax to drop all tables.
This can be placed in the beginning of the script instead of individually dropping each table.