• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Drop multiple MySQL tables

Drop multiple MySQL tables

Last week I looked at how to drop a table with MySQL showing how to do this with a query and then using the phpMyAdmin web based interface. This time I will show how to drop multiple tables with a single query and then how to do the same with phpMyAdmin.

SQL Query

Dropping multiple tables is the same as dropping a single table; additional tables are added to the DROP TABLE query in comma separated fashion. Note that running the following query to delete the example categories, products and orders table is irrecoverable and there is no prompting.

DROP TABLE categories, orders, products;

Using phpMyAdmin

To drop multiple tables in phpMyAdmin select the page which shows all the tables for a database. Tick the boxes for the tables you want to delete, and select "Drop" from the "With selected:" drop down box. This is shown in the screenshot below where all three tables have been checked: categories, orders and products.

select which tables to drop

The page will submit and a confirmation page will display asking if you really do want to drop those tables. Click "Yes" and they will be dropped.

drop table confirmation

Check Out These Related posts:

  1. MySQL utility commands
  2. Load data into MySQL with foreign key constraint issues Part 2
  3. Copy a table in MySQL
  4. How to change the storage engine a MySQL table uses

Filed Under: MySql

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap