ALTER Command Reference

Description

Modifies the definition, properties, or configuration of an existing object in Singdata Lakehouse.

Syntax

ALTER <object_type> <object_name> <actions>

Parameter Description

ParameterDescriptionRequired
<object_type>The type of object to modify, e.g., TABLE, SCHEMA, VCLUSTERYes
<object_name>The name of the object, which may include a schema prefixYes
<actions>The specific operation, e.g., ADD COLUMN, SET COMMENT, RENAME TOYes

Supported Object Types

Object TypeSyntax ExampleDescription
WorkspaceALTER WORKSPACE <name> SET ...Modify workspace configuration
Compute ClusterALTER VCLUSTER <name> ...Modify VCluster specification/status
Data ShareALTER SHARE <name> ...Modify Share configuration
SchemaALTER SCHEMA <name> ...Modify Schema properties
External SchemaALTER EXTERNAL SCHEMA <name> ...Modify external Schema configuration
Regular TableALTER TABLE <name> ...Modify table properties, add/drop columns, etc.
Table ColumnALTER TABLE <name> ALTER COLUMN ...Column-level structural changes
Dynamic TableALTER DYNAMIC TABLE <name> ...Suspend/resume/rename a dynamic table
Materialized ViewALTER MATERIALIZED VIEW <name> ...Modify materialized view properties
External TableALTER EXTERNAL TABLE <name> ...Modify external table configuration
PipeALTER PIPE <name> ...Modify Pipe scheduling configuration
UserALTER 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 ALTER statement is used to modify existing objects without the need to drop and recreate them.
  • ALTER TABLE COLUMN is specifically for column-level structural changes (add, drop, modify columns).
  • Dynamic tables do not support modifying their SQL definition via ALTER; use CREATE OR REPLACE instead.

Syntax Reference

Instances and Workspaces

Compute and Sharing

Schema and Catalog

Data Objects

Pipes and Connections

Users and Roles