SQL Keyword COLUMN
The COLUMN keyword is used to change or delete a column as mentioned below.
- It is used along with the ALTER keyword as ALTER COLUMN to change the data type of a column.
- It is used along with the DROP keyword as DROP COLUMN to delete a column.
The below SQL changes the data type of a column.
ALTER TABLE employees
ALTER COLUMN birth_date year;
The below SQL deletes a column from a table.
ALTER TABLE employees
DROP COLUMN birth_date;