Start of change

-160   THE WITH CHECK OPTION CLAUSE IS NOT VALID FOR THE SPECIFIED VIEW

Explanation

The WITH CHECK OPTION clause does not apply to a view definition under the following circumstances:
  • The view is read-only (for example, the view definition includes DISTINCT GROUP BY, or JOIN).
  • The view definition includes a subquery.
  • A view on which the specified view definition is dependent has an INSTEAD OF trigger defined.
  • The view definition references a table for which row or column access control is activated.

System action

The statement cannot be processed. The specified view was not created.

Programmer response

Correct the syntax of the WITH CHECK OPTION keyword in the CREATE VIEW statement.

SQLSTATE

42813

End of change