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

Kevin Feasel



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.

Related Posts

SQL Graph and Hierarchies

Hasan Savran shows how you can use SQL Server graph tables to handle hierarchical data: The > determines the direction of the query. By changing this arrow into other direction, you can use the same relation table to find who manages employee. For example, let’s rewrite this query and look who manages East Manager SELECT emp.Name as Emp, […]

Read More

Shortest Path with SQL Server 2019

Kevin Feasel



Shreya Verma shows off a new feature in SQL Server 2019 CTP 3.1: We are expanding the graph database capabilities with several new features. In this blog we discuss one of these features that is now available for public preview in SQL Server 2019, Shortest Path, which can be used to find a shortest path between two […]

Read More


December 2018
« Nov Jan »