Drop Clause: Columns
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Purpose
Drops a column from an existing table. It is optional.
Syntax
DROP {[COLUMN] column_name}
where:
- column_name
- specifies an existing column in an existing table.
Notes
- Drop fails if a SQL view includes the column.
Example
This example drops the status column. For the operation to succeed, the
status column cannot have a constraint defined on it and cannot be used in a SQL view.
ALTER TABLE test DROP COLUMN status