Database Error Messages

Release
toggle
  • 23ai
  • 21c
  • 19c
Updated
Jun 24, 2024

OCI-01402

view WITH CHECK OPTION where-clause violation

Cause

An INSERT or UPDATE statement was attempted on a view created with the CHECK OPTION. This would have resulted in the creation of a row that would not satisfy the view's WHERE clause.


Action

Examine the view's WHERE clause in the dictionary table VIEWS. If the current view does not have the CHECK OPTION, then its FROM clause must reference a second view that is defined using the CHECK OPTION. The second view's WHERE clause must also be satisfied by any INSERT or UPDATE statements. To insert the row, it may be necessary to insert it directly into the underlying table, rather than through the view.