DELETE Statement (ANSI System-Time Table Form) | Teradata Vantage - DELETE (ANSI System-Time Form) - Advanced SQL Engine - Teradata Database

ANSI Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
kit1592007446534.ditamap
dita:ditavalPath
kit1592007446534.ditaval
dita:id
B035-1186
lifecycle
previous
Product Category
Teradata Vantageā„¢

ANSI Compliance

This statement is ANSI SQL:2011 compliant.

Deletes one or more rows from system-time tables.

Syntax

There is no special additional temporal syntax for the DELETE statement when used on a system-time table. The syntax is identical to that used for nontemporal tables. That syntax is described fully in Teradata Vantageā„¢ - SQL Data Manipulation Language, B035-1146.

Usage Notes

  • Although the syntax for a DELETE statement is identical for system-time and non-temporal tables, the effects are different, because rows are not physically deleted from system-time tables as a result of a DELETE.
  • Because rows are not normally physically deleted from system-time tables, the storage required for these tables will not decrease, even when rows are deleted. To physically delete closed rows from system-time tables, drop the system versioning from the table. This automatically physically deletes all closed rows from the table.

    For purposes of archiving closed rows prior to deletion, closed rows may be copied to new tables by means of INSERT ... SELECT operations, after which the new tables can be archived.