如何在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