MSCEWI4050

Valid Default Constraint moved to a new Alter Table Statement.

This EWI was added for an old version of SQL Server SnowConvert

Severity

Low

Description

This EWI is added when the Default constraint mentioned on MSCEWI1088 is valid and then, transformed to an alter table statement apart.

Code Example

Input Code:

ALTER TABLE
    [Person].[EmailAddress]
ADD
    Dummy_Column VARCHAR(32),
    CONSTRAINT [DF_EmailAddress_rowguid] DEFAULT 5 FOR [rowguid]

Output Code:

ALTER TABLE
Person.EmailAddress
ALTER rowguid SET DEFAULT 5

/*** MSC-ERROR - MSCEWI4050 - DEFAULT CONSTRAINT MOVED TO A NEW ALTER TABLE STATEMENT ***/
ALTER TABLE
    Person.EmailAddress
ADD
    Dummy_Column VARCHAR(32)

Recommendations