Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (6.1k points)
Is there any query (command) to truncate all the tables in a database in a single operation? I need to know if I can do it with one single query.

1 Answer

0 votes
by (12.7k points)
edited by

Use phpMyAdmin in this way:

Database View => Check All (tables) => Empty

If you need to ignore foreign key checks, you can uncheck the box that says:

[ ] Enable foreign key checks

You'll need to be running at least version 4.5.0 or higher to get this checkbox.

Hope it works !

Want to be a SQL expert? Come and join this SQL Certification by Intellipaat.

You can check out the below MySQL Tutorial video for better understanding.

Related questions

0 votes
1 answer
asked Nov 26, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
0 votes
1 answer
asked Dec 4, 2020 in SQL by Appu (6.1k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...