The ALTER COLUMN command is utilized to modify the data type of a column within a table.
Here is an example SQL statement that changes the data type of the column named “BirthDate” in the “Employees” table to the year type.
| ALTER TABLE Employees ALTER COLUMN BirthDate year; |
The DROP COLUMN command is employed to remove a column from an existing table.
Here’s an example SQL statement that removes the “ContactName” column from the “Customers” table:
| ALTER TABLE Customers DROP COLUMN ContactName; |