SQL Flow Field Guide

GRAPH_ID_FROM_EDGE_ID

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

graph id composition or decomposition

What changes

Input
object id and graph id parts, or a node/edge id
Output or change
node or edge id component
Return type
Returns the internal graph ID, which is a bigint.

Syntax at a glance

GRAPH_ID_FROM_EDGE_ID ( edge_id )

Work example

Extract the internal graph id from a graph edge identifier.

Use graph identifiers with the matching node or edge table and retain an ordinary business key.

Check your work Keep it in graph diagnostics and retain an ordinary business key for application joins.

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