CREATE TABLE ... PERIOD FOR SYSTEM_TIME
declares the system-time period of a temporal table
What changes
- Input
- two datetime2 columns
- Output or change
- period definition on the table
Syntax at a glance
PERIOD FOR SYSTEM_TIME ( system_start_time_column_name , system_end_time_column_name )
Work example
A table needs system-time periods for point-in-time row history.
Choose period column types and hidden behavior, then test updates and historical reads in a lab.
Check your work A changed lab row has a valid start and end period in history.
Open Microsoft Learn for full syntax, permissions, and details for your version.