SQL Flow Field Guide

GRAPH_ID_FROM_NODE_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_NODE_ID ( node_id )

Work example

Extract the internal graph id from a graph node identifier.

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

Check your work Do not persist this engine-specific number as an external identity.

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