Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 in development, I'd rather not individually click "Empty" on all 60+ tables every time.

like image 946
Joshua Avatar asked Mar 27 '10 15:03

Joshua


1 Answers

IMHO the easiest solution is:

  • In phpmyadmin select the database you want to truncate in the databases-list (left-hand-side)
  • In the main view scroll down, you'll see a checkbox "Check All" and next to it a drop-down box where you can select "Empty". Done.
like image 130
andreas Avatar answered Oct 09 '22 16:10

andreas