Drop all tables in MySQL database
2014-11-18 13:42
537 查看
Drop all tables in MySQL database
Answer:
MySQL does not have a command for removing all database table(s) without dropping the database, to do so, you need the following tricks:
Related posts:
Dump the table schema of a MySQL database
Export MySQL database as CSV file
How to rename database in MySQL
How to dump an MySQL/InnoDB database
Drop a database in MongoDB
http://www.linuxask.com/questions/drop-all-tables-in-mysql-database
Answer:
MySQL does not have a command for removing all database table(s) without dropping the database, to do so, you need the following tricks:
# mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE]
Related posts:
Dump the table schema of a MySQL database
Export MySQL database as CSV file
How to rename database in MySQL
How to dump an MySQL/InnoDB database
Drop a database in MongoDB
http://www.linuxask.com/questions/drop-all-tables-in-mysql-database
相关文章推荐
- get all rows count of all tables in a mysql database.
- MySql Query To List All The Tables In Perticular Database
- drop all tables in database by T-SQL in SQLServer
- Sizes of All Tables in All Database
- SQL Server 游标运用:查看一个数据库所有表大小信息(Sizes of All Tables in a Database)
- Get size of all tables in database
- Find Text in all columns of all tables in a Database
- QL Server 查看所有数据库所有表大小信息(Sizes of All Tables in All Database)【复杂版本】
- SQL Server 游标运用:查看一个数据库所有表大小信息(Sizes of All Tables in a Database)
- SQL Server 游标运用:查看所有数据库所有表大小信息(Sizes of All Tables in All Database)
- How do I list all tables/indices contained in an SQLite database
- Delete all tables in database(Ignore the relations between tables)
- SQL Server 游标运用:查看所有数据库所有表大小信息(Sizes of All Tables in All Database)
- Import Data from Txt or CSV files into MYSQL database tables
- record drop database in sql log
- tables in database
- Finding Total Number Of Rows, Columns In A Database And Tables Sizes
- Dropping all user tables/sequences in Oracle
- groovy Exports all table names in database
- System tables of a geodatabase in SQL Server