WITH CHECK OPTION is an feature of SQL Server. It indicates, when updating a row from view, the result row of INSERT or UPDATE needs to meet WHERE criteria used for View.
For example:
CREATE VIEW VW_TechnicianEmployees_withManagers_withCheckOption
AS
SELECT EmployeeID, Title, ManagerID
FROM HumanResources. Employee
WHERE Title LIKE '%technician%'
WITH CHECK OPTION;
Output:
13 Production Technician - WC10 185
15 Production Technician - WC10 185
17 Production Technician - WC10 185
....
Trying following update command causes error. Because, view is created with WHERE criteria that contains technician phrase within Title column. Following update command that does not contain technician phrase in it, and WITH CHECK OPTION will prevent update to be executed.
Example:
UPDATE VW_TechnicianEmployees_withManagers_withChechkOption
SET Title='Chief'
WHERE EmployeeID=13
Msg 550, Level 16, State 1, Line 2
The attempted insert or update failed because the target view either specifies
WITH CHECK OPTION or spans a view that specifies WITH CHECK OPTION
and one or more rows resulting from the operation did not qualify under the
CHECK OPTION constraint.
The statement has been terminated.