We can use DROP COLUMN with ALTER tag to delete a column from a table.
Considering the below table. We can see that there are two columns that contain NULL values.
To remove those columns that contain NULL values, refer below:
1. Oracle Drop Single Column
ALTER TABLE table_name DROP COLUMN column_name ;
ALTER TABLE Stu DROP COLUMN lname;
After running the Select command we will get the output as follows:
2. Oracle Drop Multiple Columns
ALTER TABLE table_name DROP( column1, column2);
ALTER TABLE Stu DROP( max_Marks,lname);
The final table with which we are left is shown below, you can observe column max_Marks and lname does not exist in table now.