English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Usage and Examples of SQL COLUMN Keyword

SQL Keyword Reference

ALTER COLUMN (Modify Column)

The ALTER COLUMN command is used to change the data type of a column in a table.

The following SQL statement changes the data type of the 'BirthDate' column named in the 'Employees' table to the type year:

  ALTER TABLE Employees
ALTER COLUMN BirthDate 
  year;

DROP COLUMN (Delete Column)

The DROP COLUMN command is used to delete a column from an existing table.

The following SQL statement deletes the 'ContactName' column from the 'Customers' table:

  ALTER TABLE Customers
DROP COLUMN ContactName;

SQL Keyword Reference