- Becoming Familiar with Databases in PhpMyAdmin
- Running SQL Queries on a Database with PhpMyAdmin
- Searching Through a Database with PhpMyAdmin
- Creating Tables in a Database with phpMyAdmin
- Deleting Tables from a Database with PhpMyAdmin
- Importing Databases and Tables with PhpMyAdmin
- Exporting Databases and Tables with PhpMyAdmin
- Renaming Database Tables with PhpMyAdmin
- Copying a Database Table with PhpMyAdmin
- Inserting Fields into Database Tables with PhpMyAdmin
- Modifying Fields in Database Tables with PhpMyAdmin
- Deleting Fields from Database Tables with PhpMyAdmin
The scope of information needed in a table can change overtime, and you may find you no longer need a whole column of data. Removing a column from a table can help get rid of unwanted content, like if a project or product is no longer needed, to help free up disk space on a server, to clean up any empty or unused columns, or even just remove data that may have been duplicated. Removing a column is quick and easy to do in PhpMyAdmin.
This guide assumes that you have already logged in to PhpMyAdmin. We will go over how to delete a column within a table.
Starting on the home page of PhpMyAdmin, using the navigation menu on the left, click on the database name that the table we want to modify.
Next, click on the table name.
This page shows the records within the table and the various columns that each record can use. In this case we have the test_new column all the way on the right side. This is the field we want to remove, so now click on the Structure tab up near the top of the page.
The Structure tab gives details about how the existing fields are configured. Check the box next to one or more fields that we want to remove, then click on the Drop button below.
The next page gives a warning, making sure that this is the action we want to take. Now would be a good time to double-check that any backups of this table exists first in case there is some information that should not have been removed. Removing the field deletes all data within that column. With the test_new column, all the entries were blank, so nothing to worry about here. Click on the Yes button to proceed.
This page confirms that the structure change to the table went through successfully and there is no longer the test_new field. We can go back to the main table page by clicking on the table name from the left navigation menu again.
Now, the test_new column is gone and any data contained within that column has been removed.
Removing fields from within a database table can quickly be done in a few clicks in PhpMyAdmin. It will remove all record data that is saved in that column, so verify that the data being deleted is the data that should go. Additionally, it never hurts to have a good backup of the table before making any changes.
We pride ourselves on being The Most Helpful Humans In Hosting™!
Our support staff is always available to assist with any issues related to this article, 24 hours a day, 7 days a week 365 days a year.
We are available, via our ticketing systems at email@example.com, by phone (at 800-580-4986) or via a LiveChat or whatever method you prefer. We work hard for you so you can relax.