Skip to content

Truncate all tables in a MySQL database

To truncate (not dropping, truncating only deletes all table rows) all tables in a MySQL database, run this command and replace <database name> with the name of the database that should be truncated:

[sc name=”src” url=”https://stackoverflow.com/questions/1912813/truncate-all-tables-in-a-mysql-database-in-one-command” ]

One Comment

  1. launaelizondo launaelizondo

    I want to say that this post is awesome,
    nice written and come with almost all important infos. I’d like to peer more posts like this.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.