Example: Nonsequenced Delete from a Valid-Time Table - Analytics Database - Teradata Vantage

Temporal Table Support

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
eud1628112402879.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
fif1472244754791
lifecycle
latest
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';