SYSTEM_TIME
Example
Section titled “Example”SELECT *FROM Sales.OrdersFOR SYSTEM_TIME AS OF '2021-05-01T12:34:56.1234567'Output
Section titled “Output”OrderID | CustomerID | ProductID | OrderDate | Quantity--------|------------|-----------|----------------------------|----------10248 | VINET | 11 | 2021-04-30T13:34:56.1234567| 1210249 | TOMSP | 42 | 2021-04-30T14:34:56.1234567| 10Explanation
Section titled “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’.