SYSTEM_TIME
SYSTEM_TIME is a temporal clause in SQL that allows you to query data as it was at a certain point in time or throughout a specific time period. It is used with temporal tables to keep track of historical changes to the data.
Example
Output
Explanation
The SYSTEM_TIME
temporal table function with AS OF
is used to query the data as it existed at a specific point in time. In the example, the query is returning the data from the Sales.Orders
temporal table as it existed on ‘2021-05-01T12:34:56.1234567’.