Chapter 9 SQL Statements
483
WITH CHECK OPTION clause The WITH CHECK OPTION clause
rejects any updates and inserts to the view that do not meet the criteria of the
views as defined by its SELECT statement.
♦
SQL/92 Entry level feature.
♦
Sybase Supported by Adaptive Server Enterprise.
♦ Create a view showing information for male employees only. This view
has the same column names as the base table.
CREATE VIEW male_employee
AS SELECT *
FROM Employee
WHERE Sex = ’M’
♦ Create a view showing employees and the departments they belong to.
CREATE VIEW emp_dept
AS SELECT emp_lname, emp_fname, dept_name
FROM Employee JOIN Department
ON Employee.dept_id = Department.dept_id
Standards and
compatibility
Examples