I use MS SQL 2008 R2, I need create a Table with a CHECK on a specific column but I receive this error. Could you please point me out in the right direction? Thanks
HeatingSystem tinyint NOT NULL
CONSTRAINT CK_ReProperties_HeatingSystem CHECK(Size between 0 and 3),
ERROR
Msg 8141, Level 16, State 0, Line 1
Column CHECK constraint for column ‘HeatingSystem’ references another column, table ‘ReProperties’.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
With your comment, I don’t understand where “Size” is coming from…
Can’t you just make