Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Drop a Column in phpMyAdmin

This guide shows you how to remove a column from a database table using phpMyAdmin.

Databases2 min read20 steps4 screenshots

What do these words mean?

A database is a store for a website's information. Inside it, a table is like one drawer of a filing cabinet. Each table is made of rows and columns.

A column is one kind of detail kept for every item. In a table of customers, the columns might be name, email and phone. To "drop" a column means to delete it.

phpMyAdmin is a free web tool for managing databases with clicks.

Warning: dropping a column deletes all the data in it for good. It cannot be undone. A website that needs the column may break. Take a backup first.

Step 1: back up the database

  1. Log in to your hosting control panel.
  2. Open phpMyAdmin from the Databases section.
  3. Click your database name in the left panel.
  4. Click the Export tab.
  5. Click Export. A file saves to your computer.

Step 2: drop the column with clicks

  1. Click your database name in the left panel.
    Screenshot: Click your database name in the left panel.
  2. Click the table name.
    Screenshot: Click the table name.
  3. Click the Structure tab. You will see a list of columns.
  4. Find the column you want to remove.
  5. Click Drop in that row. It may show a red cross.
  6. A message asks you to confirm. Check the column name.
  7. Click OK or Yes.

Drop several columns at once

  1. On the Structure tab, tick the box next to each column to remove.
    Screenshot: On the Structure tab, tick the box next to each column to remove.
  2. Look for the line With selected under the list.
  3. Click Drop.
  4. Confirm.

Drop a column with SQL

SQL is the language used to talk to databases. You can also type the command yourself.

  1. Click the table name.
  2. Click the SQL tab.
  3. Type a command like this, using your own table and column names:
ALTER TABLE customers DROP COLUMN phone;

This deletes the column phone from the table customers.

  1. Click Go.

Check the result

Click the Structure tab again. The column should be gone. Open your website and test it.

Tip: Apps such as WordPress need their own columns to work. Do not drop columns from their tables unless you are sure.

Quick recap

  • A column is one kind of detail in a table. Dropping it deletes its data.
    Screenshot: A column is one kind of detail in a table. Dropping it deletes its data.
  • Export a backup first.
  • Use the Structure tab and click Drop, or use ALTER TABLE ... DROP COLUMN.
  • Test your website afterwards.