Alter Table

This section shows you the translations related to ALTER TABLE.

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Some parts in the output code are omitted for clarity reasons.

1. Description

Use the ALTER TABLE statement to alter the definition of a nonpartitioned table, a partitioned table, a table partition, or a table subpartition. For object tables or relational tables with object columns, use ALTER TABLE to convert the table to the latest definition of its referenced type after the type has been altered (Oracle documentation).

Oracle syntax

ALTER TABLE [ schema. ] table
  [ alter_table_properties
  | column_clauses
  | constraint_clauses
  | alter_table_partitioning
  | alter_external_table
  | move_table_clause
  ]
  [ enable_disable_clause
  | { ENABLE | DISABLE } { TABLE LOCK | ALL TRIGGERS }
  ] ...
  ;

To review Snowflake syntax, review the following documentation.

2. Sample Source Patterns

2.1. Alter table with clauses

Oracle

Snowflake

Only some column_clauses and constraint_clauses are applicable in Snowflake. In Oracle alter table allows modifying properties from partitions created but in Snowflake, these actions are not required

2.2. Alter table with not supported cases

Oracle

Snowflake

2.3. ADD CONSTRAINT action

The ADD CONSTRAINT action has an equivalent in Snowflake, but it only one constraint can be added per ALTER TABLE statement, so it will be commented when the statement contains two or more constraints.

Oracle

Snowflake

Known Issues

  1. Some properties on the tables may be adapted to or not applicable.

  1. SSC-EWI-0109: Alter Table syntax is not applicable in Snowflake.

  2. SSC-EWI-OR0067: Multiple constraint definition in a single statement is not supported in Snowflake.

Last updated