ALTER TABLE
Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ❌ Data 360 SQL ✅ Tableau Hyper API
markdownreferencev1EB6H-N0E3guide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sqlALTER TABLEData 360Data CloudData 360 Query Guide
Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/alter-table.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.
ALTER TABLE
Applies to: ❌ Data 360 SQL ✅ Tableau Hyper API
Change the definition of a table.
where column_constraint is:
and table_constraint is as described in CREATE TABLE.
ALTER TABLE changes the definition of an existing table. Hyper currently only supports the following changes:
RENAME
The RENAME forms change the name of a table, the name of an individual column in a table, or the name of a constraint of the table. There is no effect on the stored data.
ADD COLUMN [ IF NOT EXISTS ]
This form adds a new column to the table, using the same syntax as CREATE TABLE. If IF NOT EXISTS is specified and a column already exists with this name, no error is thrown. In contrast to CREATE TABLE, which supports any variable-free expression, including non-constant expressions like random(), the default value here must be a constant.
DROP COLUMN [ IF EXISTS ]
This form drops a column from a table. Columns with indexes and table constraints can't be dropped.
ADD table_constraint [ NOT VALID ]
This form adds a new constraint to a table using the same syntax as CREATE TABLE.
Some forms of ALTER TABLE that act on a single table can be combined into a list of multiple alterations to be applied together. It is possible to add several columns and/or drop several columns in a single command. It is also possible to create multiple column constraints in a single command. It is not possible to combine altering columns with adding constraints.
IF EXISTS
Do not throw an error if the table does not exist.
<name>
The name (optionally schema-qualified) of an existing table to alter.
<column_name>
Name of a new or existing column.
<new_column_name>
New name for an existing column.
<new_name>
New name for the table.
<data_type>
Data type of the new column.
The key word COLUMN is noise and can be omitted.
Changing any part of a system catalog table is not permitted.
To add a column of type text to a table:
To drop a column from a table:
To rename an existing column:
To rename an existing table:
To add an unnamed assumed foreign key constraint to a table:
See CREATE TABLE for more examples of table constraints.