17.05 - Updatable Views - Teradata Database

Teradata Vantage™ - Temporal Table Support

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
17.05
created_date
June 2020
category
Programming Reference
featnum
B035-1182-170K

Views created on temporal tables are said to be updatable if they satisfy all the existing rules of updatable views on nontemporal tables and:

  • For a view on a valid-time table or on another view, the valid-time qualifier must be SEQUENCED VALIDTIME with the restriction that it must not specify a period of applicability.
  • For a view on a transaction-time table or on another view, the transaction-time qualifier must be SEQUENCED TRANSACTIONTIME.
  • For a view on a bitemporal table or on another view, the valid-time qualifier must be SEQUENCED VALIDTIME and the transaction-time qualifier must be SEQUENCED TRANSACTIONTIME.
  • The table must not be specified with an AS OF clause.

Sequenced updatable views permit current, sequenced, nonsequenced, and nontemporal DML operations. A current or sequenced form of UPDATE issued on the view modifies the valid-time and transaction-time column values. An update privilege on the valid-time column is required in addition to those privileges normally required to perform UPDATE on an updatable view. (No additional privilege is required for the transaction-time column.)

When the WITH CHECK OPTION is specified in the updatable view and the rows are updated using the view, only the modified rows are checked for violations. Those rows that are inserted by the system as part of the temporal semantics (for example close of a row in the transaction-time dimension) are excluded from such checks as they are created to maintain temporal semantics.