How to DROP columns from an existing table in oracle

In Oracle, the possibility to drop a column/columns in an existing table can be available only after the origin of oracle 8i.

In Oracle, the possibility to drop a column/columns in an existing table can be available only after the origin of oracle 8i. The column/columns in a table can be dropped either logically or physically, but most of the time we use the logic delete. And for this the "ALTER TABLE" command is used.

Syntax:  ALTER TABLE table_name UNUSED (Col_name);

Assume the below Customer table:

Cust_table.png



Example to drop a single column:

ALTER TABLE Customer UNUSED (Age);

Result:

Cust_table1.png

Example to drop Multiple column:

ALTER TABLE Customer UNUSED (Age, Address, Country);

Result:

Cust_table2.png