Posts mySQL - drop all the tables from a database
Post
Cancel

mySQL - drop all the tables from a database

1
2
3
4
5
6
7
-- src - https://www.quora.com/How-do-I-drop-all-tables-in-a-MySQL-database
SELECT
CONCAT('DROP TABLE IF EXISTS ', table_name, ';') as tbl
FROM
information_schema.tables
WHERE
table_schema = 'your table';

origin - https://www.pipiscrew.com/?p=16313 mysql-drop-all-the-tables-from-a-database

This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags