8 SQL VIEW
8 SQL VIEW
Emp_id Emp_name
1 Adams
2 Neel
3 Johnson
4 Smith
5 Willams
The WITH CHECK OPTION
The purpose of the WITH CHECK OPTION is to
ensure that all UPDATE and INSERTs satisfy the
condition(s) in the view definition.
If they do not satisfy the condition(s), the
UPDATE or INSERT returns an error.
The WITH CHECK OPTION
EMPLOYEE_VIEW with the WITH CHECK OPTION
CREATE VIEW EMPLOYEE_VIEW AS
SELECT Emp_id,Emp_name
FROM EMPLOYEE
WHERE Emp_id IS NOT NULL WITH CHECK OPTION;