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” ]

Be First to Comment

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.