Example: Nonsequenced Delete from a Valid-Time Table - Advanced SQL Engine - Teradata Database

Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
cjo1556732840654.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1182
lifecycle
previous
Product Category
Teradata Vantage™

A nonsequenced delete applies no special temporal logic to the delete operation or row selection, and operates on a valid-time table as a conventional delete would operate on a nontemporal table:

Start from the same valid-time table that was used for the sequenced delete examples:

   Policy_ID  Customer_ID  Validity
   ---------  -----------  ------------------------
      497201    304779902  ('05/02/14', '06/02/13')
      540944    123344567  ('07/02/03', '08/02/02')
      541077    766492008  ('09/12/21', '99/12/31')
      541145    616035020  ('09/12/03', '10/12/01')
      541008    246824626  ('09/10/01', '99/12/31')

Each of the following nonsequenced DELETE statements physically deletes one row from the table:

   NONSEQUENCED VALIDTIME DELETE
   FROM Policy
   WHERE Customer_ID = 304779902;

   NONSEQUENCED VALIDTIME DELETE
   FROM Policy
   WHERE BEGIN(Validity) = DATE '2007-02-03';