How can I delete the contents of all tables in my database in phpMyAdmin without dropping the database?

后端 未结 10 2497
野趣味
野趣味 2021-02-13 03:22

How can I empty the contents of all tables in my database in phpMyAdmin without dropping any of the tables in the database?

Since I do this several times an hour while i

10条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-13 03:46

    Unfortunately, there is no TRUNCATE DATABASE or equivalent. With that said, you could probably use some kind of stored procedure that go through all tables in your database and truncate them. I found something of that kind here, but I don't know whether it works. (You should probably read the comment discussion too)

提交回复
热议问题