Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server 2016 (13.x) and later versions
Azure SQL Database
Azure SQL Managed Instance
SQL database in Microsoft Fabric
Depending on your scenario, you can either create new system-versioned temporal tables, or modify existing ones by adding temporal attributes to the existing table schema. When you modify data in a temporal table, the system builds version history transparently to applications and end users. As a result, temporal tables don't require any change to how you modify the table or query the latest (current) state of the data.
In addition to regular data modification and querying, temporal tables also provide easy ways to get insights from data history through extended Transact-SQL syntax. Every system-versioned table has an assigned history table, which is transparent to users. However, you can optimize workload performance, or the storage footprint, by creating more indexes or choosing different storage options.
The following diagram shows a typical workflow with temporal tables:
This section is divided into the following five articles:
- Create a system-versioned temporal table
- Modify data in a system-versioned temporal table
- Query data in a system-versioned temporal table
- Change the schema of a system-versioned temporal table
- Stop system-versioning on a system-versioned temporal table
Related content
- Temporal tables
- Temporal table system consistency checks
- Partition with temporal tables
- Temporal table considerations and limitations
- Temporal table security
- Manage retention of historical data in system-versioned temporal tables
- System-versioned temporal tables with memory-optimized tables
- Temporal table metadata views and functions