Press "Enter" to skip to content

What’s New In SQL Server 2019 CTP 2.1 Graph Support

Niko Neugebauer looks at a few additions to SQL Server graph support:

Now, in the next step we shall create a derived view, which shall contain the list with all Persons and Businesses, joining them together:

CREATE OR ALTER VIEW dbo.Followers AS	SELECT PersonId as Id, FullName	FROM dbo.Person	UNION ALL	SELECT BusinessId, BusinessName	FROM dbo.Business;

Now, the real new thing is that we can use such derived tables in SQL Server 2019 CTP 2.1 and Azure SQL Database together with the MATCH clause, in the statements such as the one below where we list all the followers of the “Real Stuff” company:

SELECT Followers.ID, Followers.FullName	FROM Followers, Follows, Company	WHERE MATCH(Followers-(Follows)->Company)	AND CompanyName = 'Real Stuff'

This query works fine, delivering us the expected results while generating a pretty complex execution plan in the background.

Niko focuses on heterogeneous nodes and edges, as well as derived views.