SQL Flow Field Guide

FOR SYSTEM_TIME AS OF

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

FOR SYSTEM_TIME AS OF: rows valid at one point in time

What changes

Input
temporal table current + history
Output or change
rows matching the period rule

Syntax at a glance

table FOR SYSTEM_TIME AS OF <date_time>

Work example

An audit query needs FOR SYSTEM_TIME AS OF 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 AS OF. The rows from FOR SYSTEM_TIME AS OF 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.