ALTER Command Reference
Description
Modifies the definition, properties, or configuration of an existing object in Singdata Lakehouse.
Syntax
Parameter Description
| Parameter | Description | Required |
|---|---|---|
<object_type> | The type of object to modify, e.g., TABLE, SCHEMA, VCLUSTER | Yes |
<object_name> | The name of the object, which may include a schema prefix | Yes |
<actions> | The specific operation, e.g., ADD COLUMN, SET COMMENT, RENAME TO | Yes |
Supported Object Types
| Object Type | Syntax Example | Description |
|---|---|---|
| Workspace | ALTER WORKSPACE <name> SET ... | Modify workspace configuration |
| Compute Cluster | ALTER VCLUSTER <name> ... | Modify VCluster specification/status |
| Data Share | ALTER SHARE <name> ... | Modify Share configuration |
| Schema | ALTER SCHEMA <name> ... | Modify Schema properties |
| External Schema | ALTER EXTERNAL SCHEMA <name> ... | Modify external Schema configuration |
| Regular Table | ALTER TABLE <name> ... | Modify table properties, add/drop columns, etc. |
| Table Column | ALTER TABLE <name> ALTER COLUMN ... | Column-level structural changes |
| Dynamic Table | ALTER DYNAMIC TABLE <name> ... | Suspend/resume/rename a dynamic table |
| Materialized View | ALTER MATERIALIZED VIEW <name> ... | Modify materialized view properties |
| External Table | ALTER EXTERNAL TABLE <name> ... | Modify external table configuration |
| Pipe | ALTER PIPE <name> ... | Modify Pipe scheduling configuration |
| User | ALTER USER <name> ... | Modify user properties |
Permission Requirements
Executing an ALTER operation generally requires OWNERSHIP or corresponding administrative privileges on the target object. Some operations (e.g., modifying VCLUSTER configuration) also require workspace-level administrative privileges.
Notes
- The
ALTERstatement is used to modify existing objects without the need to drop and recreate them. ALTER TABLE COLUMNis specifically for column-level structural changes (add, drop, modify columns).- Dynamic tables do not support modifying their SQL definition via
ALTER; useCREATE OR REPLACEinstead.
