TEST FOR CHECK CONSTRAINT ANOMALY SQL Server will not generate an error when creating check constraints at the column or table level that are a mismatch to the datatype of the column(s) referenced. When a check constraint is created on a column that is defined with an integer datatype and the check constraint checks for values of nonnumeric values, no error is generated. Instead, an error is generated when inserts are attempted. If you use a CASE tool to generate DDL, make sure the constraints from domain values are appropriate for the column's datatype. It may be wise to have test data values generated for each table to test for this anomaly (especially for a database with several hundred tables, which has many domain values defined for columns). The following script demonstrates this problem. CREATE TABLE CheckConstraint (Pkey INT NOT NULL, col1 INT NULL CONSTRAINT ck_col_check_constraint CHECK (col1 IN ( 'a','b' ) ), CONSTRAINT pk_CheckConstraint PRIMARY KEY (Pkey), CONSTRAINT ck_table_check_constraint CHECK (col1 IN ('a','b')) ) GO INSERT CheckConstraint VALUES(1,1) GO EXEC sp_help CheckConstraint GO DROP TABLE CheckConstraint GO ----------------------------------------