Mysql method to delete all tables in the database: directly execute the [SELECT table_name FROM information_schema.tables WHERE table_schema = 'mydb';] statement to delete.
Just execute the following SQL statement directly on the command line:
(Recommended tutorial:mysql video tutorial)
SELECT concat('DROP TABLE IF EXISTS ', table_name, ';') FROM information_schema.tables WHERE table_schema = 'mydb';
Explanation: mydb represents the database name of the table to be deleted.
Related recommendations:mysql tutorial
The above is the detailed content of How to delete all tables in mysql database. For more information, please follow other related articles on the PHP Chinese website!