|ansi sql temporal||1.58||0.5||3315||87|
Temporal tables, also named system-versioned tables, allow SQL Server to automatically keep history of the data in the table. This tip will introduce you to this feature and will explain how to create a system-versioned table. A second part of the tip will dive deeper into querying temporal tables.What is a system-versioned temporal table?
A system-versioned temporal table is a type of user table designed to keep a full history of data changes to allow easy point in time analysis. This type of temporal table is referred to as a system-versioned temporal table because the period of validity for each row is managed by the system (i.e. database engine).What are the temporal sub-clauses in SQL?
It is further classified into four temporal sub-clauses. This provides a way to query the data across current and history tables. The AS OF clause is used when there is a need to rebuild the original state of the data and need to know the state it was at any specific time in the past.What are the limitations of SQL Server 2017 temporal tables?
However, in SQL Server 2017 many limitations were removed. Check out Changing the Schema of a System-Versioned Temporal Table for more information. In SQL Server 2016 and 2017 it's still not possible to drop a temporal table while system-versioning is enabled.