SSC-EWI-OR0067

Multiple constraint definition in a single statement is not supported in Snowflake.

Severity

Medium

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

Description

Multiple Constraint Definition in a single ALTER TABLE statement is not supported in Snowflake.

Example Code

Oracle:

IN -> Oracle_01.sql
ALTER TABLE TABLE1 ADD (
  CONSTRAINT TABLE1_PK
  PRIMARY KEY
  (ID)
  ENABLE VALIDATE,
  CONSTRAINT TABLE1_FK foreign key(ID2)
  references TABLE2 (ID) ON DELETE CASCADE);

Snowflake Scripting:

OUT -> Oracle_01.sql
!!!RESOLVE EWI!!! /*** SSC-EWI-OR0067 - MULTIPLE CONSTRAINT DEFINITION IN A SINGLE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE. ***/!!!
ALTER TABLE TABLE1
ADD (
  CONSTRAINT TABLE1_PK
  PRIMARY KEY
  (ID) ,
  CONSTRAINT TABLE1_FK foreign key(ID2)
  references TABLE2 (ID) ON DELETE CASCADE);

Recommendations

Last updated