Alter Table

This section shows you the translations related to ALTER TABLE.

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

3. Known Issues

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

MSCEWI1002: Removed next statement, not applicable in SnowFlake.

MSCEWI3046: Alter Table syntax is not applicable in Snowflake.

Last updated

Was this helpful?