WITH NOCHECK
WITH NOCHECK is a SQL statement in the Constraints category. SQL Server: adds a constraint WITHOUT validating existing data. Only future INSERT/UPDATE are checked. The syntax is ALTER TABLE table WITH NOCHECK ADD CONSTRAINT name CHECK (condition);. It returns constraint with no existing data validation. A typical example: ALTER TABLE employees WITH NOCHECK ADD CONSTRAINT salary_check CHECK (salary >= 0); -- Existing rows with negative salary are NOT rejected -- But future INSERT/UPDATE must satisfy the check A close relative is PRIMARY KEY, which a column or set of columns that uniquely identifies each row. Only one PK per table. Automatically creates a unique index. A close relative is FOREIGN KEY, which ensures referential integrity: values in this column must exist in the referenced parent table. A close relative is UNIQUE, which ensures all values in a column (or combination) are unique across the table. Allows NULLs (multiple NULLs allowed).