systemversioned
Systemversioned, often referred to as system-versioned temporal tables, is a database feature that automatically preserves a full history of data changes over time. In Microsoft SQL Server, system-versioned tables provide built-in support for storing and querying past data without requiring manual audit logic. A base table is configured to keep previous versions in a separate history table, while current rows remain in the base table with a validity period.
Key elements of the implementation include period columns and system time semantics. Two columns, typically created
Changes to data—such as updates and deletes—result in new versions being stored in the history table, while
Usage considerations include ensuring a suitable primary key on the base table, choosing a history table strategy,