WITH CHECK OPTION - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Publication Date
February 2025
Publication ID
B700-4600-008K
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
ft:sourceId
dita
dita:id
jbe1714339405530

Restricts the rows that can be updated in the table by an INSERT or UPDATE request.

The following rules apply to updatable views and WITH CHECK OPTION.
  • If WITH CHECK OPTION is specified, the view must be updatable. If a view is not updatable, then specifying WITH CHECK OPTION has no effect.

    Also, any INSERT or UPDATE operations on an underlying base table through the view does not create a row for which the WHERE clause condition evaluates to FALSE.

  • If WITH CHECK OPTION is not specified in an updatable view, then any WHERE clause contained in the query defining the view is ignored for any INSERT or UPDATE request made through the view.
  • Nested views defined to reference a single base table may be updatable. WITH CHECK OPTION in a view definition causes the WHERE clause for that view, and WHERE clauses of any underlying views, to be checked in the constraint for INSERT or UPDATE requests.