How to delete a column in a database table?

In a database table, all fields should always be related with each other. If there is/are fields which are not related to it, then it should be deleted immediately. Drop Column is used to remove an entire column and all its data from a table.


ALTER TABLE table_name DROP COLUMN field_name;

Supposed we have a table named customers

You noticed the Prod_code field in the table, then we have to delete that column. So following the syntax now, we have: