SQL -Structured Query Language - SQL Table - Alter - Drop Column Tutorial
To drop or delete a column from the existing created table, then we can use an ' ALTER TABLE ' statement.
The basic syntax for the ALTER TABLE statement to drop or delete a column in the existing table is given below –
ALTER TABLE table_name DROP COLUMN col_name;
If we want to delete or drop column created_at from the user_detail table
Then use the following syntax-
ALTER TABLE user_detail DROP COLUMN created_at;
ALTER TABLE user_detail DROP created_at;
This both query or statement will delete or drop the created_at column from the user_detail table.
In Mysql Workbench-
using a column in a statement-
without using a column in a statement-