The EDGE_ID_FROM_PARTS function

Finally, the EDGE_ID_FROM_PARTS function is analogous to the NODE_ID_FROM_PARTS function and constructs the edge_id from a given object_id and graph_id, as shown in the following code:

SELECT EDGE_ID_FROM_PARTS(OBJECT_ID('dbo.Follows'), 1);

It returns the JSON value that corresponds to the value in the first row in the dbo.Follows edge table, as shown in the following code:

-----------------------------------------------------------{"type":"edge","schema":"dbo","table":"Follows","id":1}

Get SQL Server 2017 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.