SQL Tutorial SQL Advanced SQL Database SQL References

SQL DROP COLUMN Keyword



The SQL DROP COLUMN keyword is used to a delete columns from an existing table.

Syntax

The syntax for using DROP COLUMN keyword to drop columns is given below:

ALTER TABLE table_name
DROP COLUMN column_name;

Example:

Consider a database table called Employee with the following records:

EmpIDNameCityAge
1JohnLondon25
2MarryNew York24
3JoParis27
4KimAmsterdam30

DROP COLUMN

To drop the Salary column from the Employee table, the SQL code mentioned below can be used:

ALTER TABLE Employee
DROP COLUMN Age;

This will produce the below mentioned result:

EmpIDNameCity
1JohnLondon
2MarryNew York
3JoParis
4KimAmsterdam

❮ SQL Keywords