Drop a Column
How to Drop a Column in SQL
If you need to DROP a column in SQL, use the ALTER TABLE statement with the DROP COLUMN clause.
Here is the syntax:
ALTER TABLE table_name DROP COLUMN column_name;
For example, suppose you have a table called “tv_show” with columns “show_name”, “year_launch”, “genre”, and “rating”. To DROP the “rating” column, you would use the following SQL statement:
ALTER TABLE tv_show DROP COLUMN rating;
After running this query, the “rating” column will no longer exist in the “tv_show” table.
Note that to DROP a column in SQL means to remove all the data stored in that column, so make sure to back up any essential data.
You can also Drop a Table entirely.