Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

COLUMN

ALTER COLUMN

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.

Example

ALTER TABLE Employees
ALTER COLUMN BirthDate year;

DROP COLUMN

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:

Example

ALTER TABLE Customers
DROP COLUMN ContactName;