SQL Flow Field Guide

MATCH

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

graph pattern match: node-(edge)->node chains act as joins on $from_id/$to_id

What changes

Input
node tables and edge tables listed in FROM
Output or change
rows for every matched path pattern

Syntax at a glance

MATCH (<graph_search_pattern>)

Work example

A controlled task needs the behavior documented for MATCH before it is added to a batch.

Read the linked Microsoft syntax and test MATCH with synthetic input in an isolated database. Record its scope, permissions, and error path.

Check your work MATCH. The observed MATCH behavior matches its written purpose and the test has no effect on permanent data or credentials.

Open Microsoft Learn for full syntax, permissions, and details for your version.