When a table is no longer needed, you can permanently remove it from your database using the Nobregas MySQL Panel. Dropping a table deletes all its data, columns, indexes, and structure — it is a complete and irreversible removal.
What Happens When You Drop a Table
Dropping a table permanently removes:
- All rows and data stored in the table.
- All columns and the table schema.
- All indexes, keys, and constraints defined on the table.
- All triggers associated with the table.
The table cannot be recovered after dropping unless you have a backup.
How to Drop a Table
- Log in at mysql.nobregas.org.
- Navigate to Databases > click Manage on your database.
- In the tables list, find the table you want to drop.
- Click the Drop button (red, with a trash icon) on that table's row.
- A confirmation dialog appears asking: "Drop table [name]? All data will be deleted."
- Click Drop Table to confirm.
The table is removed instantly. It disappears from the tables list and your database size decreases accordingly.
Drop vs. Truncate
| Feature | Drop | Truncate |
|---|---|---|
| Removes data | Yes | Yes |
| Removes table structure | Yes | No |
| Table still exists after | No | Yes |
| Can insert new data after | No (table gone) | Yes |
| Resets auto-increment | N/A | Yes |
Use Drop when you no longer need the table at all. Use Truncate when you want to keep the table but clear its data.
Before You Drop
- Create a backup — Use the Backups page to save your database state before dropping important tables.
- Check for dependencies — Other tables may reference this table through foreign keys. Dropping it could cause errors in your application.
- Verify the table name — Make sure you are dropping the correct table. Look at the table name carefully before confirming.
Recovering a Dropped Table
If you have a backup that includes the dropped table, you can restore it:
- Go to the Backups page.
- Find a backup created before the drop.
- Click Restore to bring back the entire database state, including the dropped table.
Note: Restoring replaces the entire database, so any data added after the backup will be overwritten.
Dropping Tables via SQL
You can also drop tables using the SQL Query page:
DROP TABLE IF EXISTS old_table_name;
The IF EXISTS clause prevents an error if the table has already been deleted.