1
votes

I am trying to create a simple node table, using:

CREATE TABLE Person (ID INTEGER PRIMARY KEY, name VARCHAR(100)) AS NODE

But whatever I try I get an error:

Incorrect syntax near the keyword 'as'. as if it doesn't understand the 'As Node' part.

I am using SQL Server 13.0.1601.
Database compatibility: SQL Server level 2016(130)
SSMS: v17.2
@@version: "Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64) Apr 29 2016 23:23:58 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 6.3 (Build 14393: ) (Hypervisor)"

1
Simply, you can't because you have SQL Server 2016 Not 2017.Ilyes

1 Answers

4
votes

You can't do CREATE TABLE (SQL Graph) in earlier versions of SQL Server, because it applies to SQL Server 2017.

See the documentation.

Enter image description here