Mysql wokbench数据库 [英] Mysql wokbench database

查看:87
本文介绍了Mysql wokbench数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何删除所有表而不用单个查询删除db中的结构...

how to delete all tables without deleting structure in db with single query...

推荐答案

您必须在每个表上使用TRUNCATE TABLEDELETE语句数据库中的表.无法在单个语句中擦除数据库中的所有数据.
You have to use TRUNCATE TABLE or DELETE statement on each table in the database. There is no way to wipe out all data in a database in a single statement.


要在mysql中清空表,请使用truncate语句
参见: http://dev.mysql.com/doc/refman/5.6/en/truncate-table.html [ ^ ]

查询:
to empty a table in mysql use the truncate statement
see: http://dev.mysql.com/doc/refman/5.6/en/truncate-table.html[^]

the query:
SELECT Concat('TRUNCATE TABLE ', TABLE_NAME) FROM INFORMATION_SCHEMA.TABLES


(通过Google在2分钟内找到)


(found in 2 minutes via Google)


这篇关于Mysql wokbench数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆