SSC-EWI-OR0067

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

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.

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

  • No end-user actions are required.

  • If you need more support, you can email us at [email protected]

Last updated