MSCEWI3067

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

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Medium

Description

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

Example Code

Input Code:

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

Output Code:

-- ** MSC-ERROR - MSCEWI3067 - MULTIPLE CONSTRAINT DEFINITION IN A SINGLE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE. **
--ALTER TABLE PUBLIC.TABLE1 ADD (
--  CONSTRAINT TABLE1_PK
--  PRIMARY KEY
--  (ID),
--  CONSTRAINT TABLE1_FK foreign key(ID2)
--  references PUBLIC.TABLE2 (ID) ON DELETE CASCADE)
                                                  ;

Recommendations

Last updated