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

后端 未结 10 1596
予麋鹿
予麋鹿 2021-02-13 03:32

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:58

    We can truncate all tables data by phpMyAdmin actually!

    In phpMyAdmin, you can do it as following steps:

    1) select u DB and do Export operation as this way:

    select Custom Export method

    • select 'Dump Table -> data' in Format-specific options
    • select 'Add DROP TABLE ... statement' in Object Creation Options.

    By this step, phpMyAdmin helps us create one sql script of full list of all tables

    3) do Import operation to delete and create each blank table one by one by this script

    enter image description here

提交回复
热议问题