Everything you need to know about Temporal Tables
Proposed session for SQLBits 2026TL; DR
Temporal tables in SQL Server are used to save versions of data rows in a table. The built-in functionality replaces complicated application code for versioning and the automated timestamps can be used to load SCD type 2 dimensions in a warehouse.
Session Details
Temporal Tables (or system versioned tables) were introduced in SQL Server 2016 as a way to automatically version rows within a table.
In this session I will present:
- Create a new table which is system versioned
- Start system versioning on existing tables.
- Transform a main/history-table pair from application versioned to system versioned.
- How to query using the SYSTEM TIME AS OF extensions to SELECT queires.
- How to use the Row Start and Row End attributes for delta loads into a data warehouse.
- How to load Type 2 Slowly Changing Dimensions using system versioned tables
- Performance considerations for your history table.
In this session I will present:
- Create a new table which is system versioned
- Start system versioning on existing tables.
- Transform a main/history-table pair from application versioned to system versioned.
- How to query using the SYSTEM TIME AS OF extensions to SELECT queires.
- How to use the Row Start and Row End attributes for delta loads into a data warehouse.
- How to load Type 2 Slowly Changing Dimensions using system versioned tables
- Performance considerations for your history table.
3 things you'll get out of this session
Learn how to create new temporal tables and to implement system versioning on existing tables
Learn how temporal tables can be used to load SCD2 dimensions and deltas into fact tables in warehouses
Learn about performance considerations for queries against main/history tables.