FOR SYSTEM_TIME ALL
FOR SYSTEM_TIME ALL: every current and historical row
What changes
- Input
- temporal table current + history
- Output or change
- rows matching the period rule
Syntax at a glance
table FOR SYSTEM_TIME ALL
Work example
An audit query needs FOR SYSTEM_TIME ALL to answer a time-bounded question about a temporal table.
Use explicit UTC timestamps and test both ends of the interval. Confirm the table is system-versioned before relying on history.
Check your work FOR SYSTEM_TIME ALL. The rows from FOR SYSTEM_TIME ALL match the requested time boundary and current rows are not confused with history rows.
Open Microsoft Learn for full syntax, permissions, and details for your version.