skip to main content
Querying data stores with SQL : Supported SQL and Extensions : Alter Table for Salesforce
  

Try Now

Alter Table for Salesforce

Purpose

The Alter Table statement adds a column, removes a column, or redefines a column in a table.

Syntax

ALTER TABLE table_name[add_clause]
[drop_clause]
where:
table_name
specifies an existing table.
add_clause
specifies a column or a foreign key constraint to be added to the table. See Add Clause: Columns and Add Clause: Constraints
drop_clause
specifies a column to be dropped from the table. See Drop Clause: Columns for a complete explanation.

Notes

*You cannot drop a constraint from a table.
* Add Clause: Columns
* Add Clause: Constraints
* Drop Clause: Columns