Links

MSCEWI1088

Expressions like function calls, variables, or named constants are not allowed on default option in Snowflake

Severity

Medium

Description

This error is added on the code when the default option is followed by expressions like function calls, variable names or named constants.
Snowflake only supports explicit constants like numbers or strings.

Example Code

Input Code:

ALTER TABLE
T_ALTERTABLETEST
ADD
COLUMN COL10 INTEGER DEFAULT RANDOM(10)

Output Code:

ALTER TABLE PUBLIC.T_ALTERTABLETEST
ADD
COLUMN COL10 INTEGER
-- ** MSC-ERROR - MSCEWI1088 - ONLY EXPLICIT CONSTANTS ARE SUPPORTED ON DEFAULT CLAUSE **
-- DEFAULT RANDOM(10)
;

Recommendations