如何在SQL中进行查询以删除每个表中存在的所有记录。删除所有表中存在的所有记录
有可能使用命令delete写每个名称表。但编写每一个名字表需要很长时间。
我已经尝试在MySQL DELETE FROM *
但它得到了错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*' at line 1
那么,这是在PHP?我在C#中提供了一个答案(有点伪)... – IAbstract 2010-10-20 04:57:37
Duplicate http://stackoverflow.com/questions/935284/is-there-a-way-to-truncate-most-tables-in-a-mysql-模式 http://stackoverflow.com/questions/454174/how-to-empty-all-rows-from-all-tables-in-mysql-in-sql – 2010-10-20 05:12:21
@dboarman:不,实际上我想插入记录后我删除所有记录存在数据库。谢谢 – 2010-10-20 08:00:29